Merge lp:~canonical-isd-hackers/canonical-identity-provider/long-query into lp:canonical-identity-provider/release
Status: | Merged |
---|---|
Approved by: | Danny Tamez |
Approved revision: | no longer in the source branch. |
Merged at revision: | 233 |
Proposed branch: | lp:~canonical-isd-hackers/canonical-identity-provider/long-query |
Merge into: | lp:canonical-identity-provider/release |
Diff against target: |
19 lines (+3/-1) 2 files modified
SCHEMA_CHANGES.txt (+2/-0) identityprovider/models/authtoken.py (+1/-1) |
To merge this branch: | bzr merge lp:~canonical-isd-hackers/canonical-identity-provider/long-query |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Danny Tamez (community) | Approve | ||
Ricardo Kirkner | Pending | ||
Review via email: mp+82229@code.launchpad.net |
Commit message
Index AuthToken's e-mail field, for quickly nullifying other tokens for a single address.
Description of the change
IMPORTANT NOTE: I based this revision off of the last revno in trunk that was from stable. This patch could be applied directly to stable, as we may want this change on production before deploying the newer features in trunk.
SSO has one query that takes up way more time than any other. This index enables that query to do a O(log N) index scan instead of an O(N) table scan, speeding it up by several orders of magnitude.
We don't currently have a way to manage migrations for SSO, so I added the effective changes (derived from Django's actual output) to SCHEMA_CHANGES.txt.
Looks fine!