PEXPlugins/PermissionsEx — pull request #434 by Psithief (2012-06-05 12:28:31+00:00)
Title: Change ordering for SQL permissions to something useful.

Ordering by permission means that all negation nodes and all non-inheriting nodes are checked first for an entity. This is what every single user needs. There is not a single use for permissions being checked in order of insertion.

Example order returned:
#-permission
#permission
-permission
permission

Additionally, this precludes the need to order the result because the ordering is already present in the existing index `unique`. Ordering by id is therefore slower than ordering by permission. An EXPLAIN SELECT query will demonstrate this.