Timeout on Distribution:+bugs search
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Critical
|
Robert Collins |
Bug Description
bug search across all ubuntu
recent:
OOPS-1842C1473
SQL time: 12539 ms
Non-sql time: 709 ms
Total time: 13248 ms
Statement Count: 69
~7.5 seconds in one query to get series_bug_count. ~4 seconds in the query for the bug listing.
on staging:
Aggregate (cost=7733840.
-> Nested Loop Left Join (cost=0.
-> Nested Loop Left Join (cost=0.
-> Nested Loop (cost=0.
-> Index Scan using sourcepackagena
-> Index Scan using product_pkey on product (cost=0.00..0.32 rows=1 width=4) (actual time=0.001..0.001 rows=0 loops=1)
Total runtime: 3435.810 ms
(32 rows)
for
SELECT COUNT(*)
FROM BugTask
LEFT JOIN Bug ON BugTask.bug = Bug.id
LEFT JOIN Product ON BugTask.product = Product.id
LEFT JOIN SourcePackageName ON BugTask.
WHERE Bug.id = BugTask.bug
AND BugTask.
AND ((BugTask.status = 10)
OR (BugTask.status = 15)
AND (Bug.date_
AND BugTask.
OR (BugTask.status = 15)
AND (Bug.date_
OR BugTask.
OR (BugTask.status = 20)
OR (BugTask.status = 21)
OR (BugTask.status = 22)
OR (BugTask.status = 25))
AND Bug.duplicateof IS NULL
AND (Bug.fti @@ ftq('kpassgen')
OR BugTask.fti @@ ftq('kpassgen')
OR BugTask.
AND (Bug.private = FALSE
OR EXISTS
(SELECT BugSubscription.bug
FROM BugSubscription,
WHERE TeamParticipati
AND TeamParticipati
AND BugSubscription.bug = Bug.id
UNION SELECT BugTask.bug
FROM BugTask,
WHERE TeamParticipati
AND TeamParticipati
AND BugTask.bug = Bug.id));
Related branches
- Tim Penhey (community): Approve (code)
- Ian Booth (community): Approve (code*)
-
Diff: 446 lines (+72/-127)9 files modifiedlib/lp/bugs/browser/tests/test_buglisting.py (+2/-2)
lib/lp/bugs/configure.zcml (+1/-5)
lib/lp/bugs/interfaces/bugtask.py (+1/-0)
lib/lp/bugs/model/bugtask.py (+28/-43)
lib/lp/bugs/model/tests/test_bugtask.py (+18/-8)
lib/lp/bugs/tests/test_bugsearch_conjoined.py (+6/-2)
lib/lp/bugs/tests/test_bugtask_search.py (+5/-64)
lib/lp/registry/browser/milestone.py (+8/-0)
lib/lp/registry/browser/tests/test_milestone.py (+3/-3)
tags: | added: timeout |
description: | updated |
summary: |
- Timeout on bug search + Timeout on Distribution:+bugs search |
Changed in malone: | |
status: | New → Triaged |
importance: | Undecided → High |
description: | updated |
description: | updated |
Changed in launchpad: | |
importance: | High → Critical |
description: | updated |
description: | updated |
Changed in launchpad: | |
assignee: | nobody → Robert Collins (lifeless) |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
Timings are showing that BugTask. targetnamecache can no longer be queried fast enough - there are just too many bug tasks now.
launchpad_prod_3=# select count(*) from BugTask where BugTask. targetnamecache ilike '%grub%';
count
-------
3183
(1 row)
Time: 1668.405 ms
We can't shave this time off the queries - we need a better way of doing the substring search, or drop the substring search.
(but this isn't the whole problem)