Distribution:+bugtarget-portlet-bugfilters-stats timeouts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Critical
|
Stuart Bishop |
Bug Description
The latest in the saga:
13 SELECT BugTask.status, BugTask.importance, Bug.latest_
GET: 13 Robots: 0 Local: 13
13 https:/
OOPS-1982AO45, OOPS-1982AP74, OOPS-1982BA36, OOPS-1982BC12, OOPS-1982DU45
Slow query:
18. 63 10735ms SQL-launchpad-
SELECT BugTask.status,
FROM BugTask,
Bug
WHERE Bug.id = BugTask.bug
AND BugTask.
AND ((BugTask.status = 10)
OR (BugTask.status = 15)
OR (BugTask.status = 20)
OR (BugTask.status = 21)
OR (BugTask.status = 22)
OR (BugTask.status = 25))
AND Bug.duplicateof IS NULL
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))
GROUP BY BugTask.status,
Related branches
- Stuart Bishop (community): Approve (db)
-
Diff: 176 lines (+160/-1)2 files modifieddatabase/schema/patch-2208-76-4.sql (+159/-0)
database/schema/security.cfg (+1/-1)
- Henning Eggers (community): Approve
-
Diff: 1302 lines (+256/-387)22 files modifiedlib/lp/bugs/browser/bugtarget.py (+22/-12)
lib/lp/bugs/browser/bugtask.py (+5/-10)
lib/lp/bugs/interfaces/bugsummary.py (+17/-1)
lib/lp/bugs/interfaces/bugtarget.py (+0/-9)
lib/lp/bugs/interfaces/bugtask.py (+10/-5)
lib/lp/bugs/model/bug.py (+3/-2)
lib/lp/bugs/model/bugsummary.py (+30/-2)
lib/lp/bugs/model/bugtarget.py (+16/-35)
lib/lp/bugs/model/bugtask.py (+53/-5)
lib/lp/bugs/stories/bugs/xx-portlets-bug-milestones.txt (+12/-34)
lib/lp/bugs/tests/bugtarget-bugcount.txt (+0/-137)
lib/lp/bugs/tests/test_bugtarget.py (+1/-11)
lib/lp/bugs/tests/test_bugtask_search.py (+12/-9)
lib/lp/registry/configure.zcml (+8/-1)
lib/lp/registry/model/distribution.py (+10/-20)
lib/lp/registry/model/distributionsourcepackage.py (+9/-21)
lib/lp/registry/model/distroseries.py (+10/-17)
lib/lp/registry/model/milestone.py (+8/-1)
lib/lp/registry/model/product.py (+8/-15)
lib/lp/registry/model/productseries.py (+6/-12)
lib/lp/registry/model/projectgroup.py (+8/-13)
lib/lp/registry/model/sourcepackage.py (+8/-15)
description: | updated |
Changed in launchpad: | |
assignee: | nobody → Stuart Bishop (stub) |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
bug summary can definitely answer most of the stats we need rapidly, but the fixed-upstream stat may be harder to get without a table scan. An open question is whether a table scan + bugsummary would be cheaper at all than the current tablescan.
The current scan does a lookup per bugtask for related bugtasks. So one way to rephrase that would be to pull back more raw data and get a group-and-count of the.
The privacy clause is 1 second hot; the related bugtask check another 1 second hot.
The bug join is ~ 2.5 seconds (0.014 * 190K) - a table scan of just bugtask is 1 second hot.
If we denormalise duplicate and latest_ patch_uploaded onto bugtask we may be able to do a much more efficient query (even though the table will be getting wider).