timeout on Bugtask:+Index in subscription lookups
Bug #1062291 reported by
Andreas Hasenack
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Critical
|
Steve Kowalik |
Bug Description
When trying to view this bug:
https:/
I get repeated timeouts. Some of the OOPSes:
https:/
https:/
Related branches
lp://staging/~stevenk/launchpad/no-more-o-n-queries-bug-dupes
- William Grant (community): Approve (code)
-
Diff: 345 lines (+88/-90)5 files modifiedlib/lp/bugs/browser/tests/test_bug_views.py (+25/-10)
lib/lp/bugs/browser/tests/test_bugtask.py (+1/-1)
lib/lp/bugs/model/bug.py (+25/-22)
lib/lp/bugs/model/personsubscriptioninfo.py (+36/-56)
lib/lp/bugs/model/tests/test_personsubscriptioninfo.py (+1/-1)
Changed in launchpad: | |
assignee: | nobody → Steve Kowalik (stevenk) |
status: | Triaged → In Progress |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
slow SQL:
QUERY PLAN ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- --- 03..159. 04 rows=1 width=763) (actual time=3892. 866..3892. 888 rows=1 loops=1) 03..159. 04 rows=1 width=763) (actual time=3892. 864..3892. 864 rows=26 loops=1) .person 710..3892. 594 rows=26 loops=1) 665..3892. 042 rows=26 loops=1)
-> Nested Loop (cost=0.00..105.38 rows=101 width=32) (actual time=0.085..512.618 rows=158602 loops=1)
- > Index Scan using teamparticipati on_person_ idx on teamparticipation (cost=0.00..5.01 rows=2 width=4) (actual time=0.020..0.110 rows=30 loops=1)
Index Cond: (person = 1191103)
- > Index Scan using bugsubscription _person_ idx on bugsubscription (cost=0.00..49.76 rows=34 width=28) (actual time=0.029..14.230 rows=5287 loops=30)
Index Cond: (person = teamparticipati on.team)
-> Index Scan using bug_pkey on bug (cost=0.00..0.48 rows=1 width=4) (actual time=0.021..0.021 rows=0 loops=158602)
Index Cond: (id = bugsubscription .bug)
Filter: ((id = 523896) OR (duplicateof = 523896))
Index Cond: (id = bugsubscription .person)
-------
Unique (cost=159.
-> Sort (cost=159.
Sort Key: person.name, bugsubscription
Sort Method: quicksort Memory: 38kB
-> Nested Loop (cost=0.00..159.02 rows=1 width=763) (actual time=709.
-> Nested Loop (cost=0.00..155.07 rows=1 width=32) (actual time=709.
-> Index Scan using person_pkey on person (cost=0.00..3.93 rows=1 width=735) (actual time=0.014..0.014 rows=1 loops=26)
Total runtime: 3893.299 ms