Archive:+index timeouts : ArchiveView.num_pkgs_building can be very slow
Bug #709717 reported by
William Grant
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Critical
|
Julian Edwards |
Bug Description
As seen in OOPS-1855H1087, the query generated by ArchiveView.
Related branches
lp:~julian-edwards/launchpad/num-pkgs-bug-709717
- Robert Collins (community): Approve
-
Diff: 89 lines (+30/-20)3 files modifiedlib/lp/soyuz/browser/archive.py (+2/-20)
lib/lp/soyuz/interfaces/archive.py (+2/-0)
lib/lp/soyuz/model/archive.py (+26/-0)
summary: |
- ArchiveView.num_pkgs_building can be very slow + Archive:+index timeouts : ArchiveView.num_pkgs_building can be very slow |
tags: | removed: oops |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Its generating a nonsense-big table; changing it to this makes it take < 25% of the time:
launchpad_ qastaging= > SELECT COUNT(*) lease.id FROM BinaryPackageBuild, BuildFarmJob, PackageBuild, SourcePackageRe lease ild.source_ package_ release = SourcePackageRe lease.id ild.package_ build = PackageBuild.id AND PackageBuild. archive = 20931 build_farm_ job = BuildFarmJob.id lease.id lease ild.source_ package_ release = SourcePackageRe lease.id ild.package_ build = PackageBuild.id archive = 20931 AND PackageBuild. build_farm_ job = BuildFarmJob.id AND BuildFarmJob.status = 6)) AS "_tmp" ;
FROM (
(SELECT DISTINCT SourcePackageRe
WHERE BinaryPackageBu
AND BinaryPackageBu
AND PackageBuild.
AND BuildFarmJob.status = 0) EXCEPT
(SELECT DISTINCT SourcePackageRe
FROM BinaryPackageBuild, BuildFarmJob, PackageBuild, SourcePackageRe
WHERE BinaryPackageBu
AND BinaryPackageBu
AND PackageBuild.