Merge ~cjwatson/launchpad:optimize-person-sorting into launchpad:master
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Colin Watson | ||||
Approved revision: | d6b8875f0ad30d36e467bc4d6a5dd090c7a976d0 | ||||
Merge reported by: | Otto Co-Pilot | ||||
Merged at revision: | not available | ||||
Proposed branch: | ~cjwatson/launchpad:optimize-person-sorting | ||||
Merge into: | launchpad:master | ||||
Diff against target: |
13 lines (+1/-1) 1 file modified
lib/lp/registry/model/person.py (+1/-1) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Colin Watson (community) | Approve | ||
Review via email: mp+436194@code.launchpad.net |
Commit message
Optimize short-circuit case in PersonSet.
Description of the change
Ordering this query by `Person.
Limit (cost=798114.
-> Sort (cost=798114.
Sort Key: person.displayname, person.name
-> Merge Join (cost=1.
-> Index Scan using account_pkey on account (cost=0.
-> Index Scan using person_
Using `Person.
Limit (cost=0.99..111.69 rows=76 width=1081)
-> Nested Loop (cost=0.
-> Index Scan using person_sorting_idx on person (cost=0.
-> Index Scan using account_pkey on account (cost=0.43..0.48 rows=1 width=4)
This is pretty simple (at least after digging through the SQL details), and there's been plenty of time for objections, so I'm going to go ahead with this.