1 SELECT BuildFarmJob.status, COUNT(BinaryPackageBuild.id) FROM BinaryPackageBuild, PackageBuild, B ... eBuild.build_farm_job = BuildFarmJob.id GROUP BY BuildFarmJob.status ORDER BY BuildFarmJob.status:
GET: 1 Robots: 1 Local: 0
1 https://launchpad.net/%7Eubuntu-langpack/+archive/ppa/+packages (Archive:+packages)
OOPS-2032CD17
explain analyze SELECT BuildFarmJob.status, COUNT(BinaryPackageBuild.id)
FROM BinaryPackageBuild,
PackageBuild,
BuildFarmJob
WHERE BinaryPackageBuild.package_build = PackageBuild.id
AND PackageBuild.archive = 32
AND PackageBuild.build_farm_job = BuildFarmJob.id
GROUP BY BuildFarmJob.status
ORDER BY BuildFarmJob.status;
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=160880.79..160880.81 rows=9 width=8) (actual time=10723.883..10723.887 rows=6 loops=1)
Sort Key: buildfarmjob.status
Sort Method: quicksort Memory: 25kB
-> HashAggregate (cost=160880.53..160880.65 rows=9 width=8) (actual time=10723.852..10723.858 rows=6 loops=1)
-> Hash Join (cost=78571.81..160432.56 rows=89594 width=8) (actual time=5051.671..10650.707 rows=88721 loops=1)
Hash Cond: (buildfarmjob.id = packagebuild.build_farm_job)
-> Seq Scan on buildfarmjob (cost=0.00..57894.77 rows=2636577 width=8) (actual time=0.016..1883.154 rows=2634379 loops=1)
-> Hash (cost=77451.88..77451.88 rows=89594 width=8) (actual time=5045.758..5045.758 rows=88721 loops=1)
-> Hash Join (cost=14699.54..77451.88 rows=89594 width=8) (actual time=202.379..4959.105 rows=88721 loops=1)
Hash Cond: (binarypackagebuild.package_build = packagebuild.id)
-> Seq Scan on binarypackagebuild (cost=0.00..39449.68 rows=2560768 width=8) (actual time=0.009..1622.301 rows=2560644 loops=1)
-> Hash (cost=13579.62..13579.62 rows=89594 width=8) (actual time=196.440..196.440 rows=88721 loops=1)
-> Index Scan using packagebuild__archive__idx on packagebuild (cost=0.00..13579.62 rows=89594 width=8) (actual time=0.030..116.719 rows=88721 loops=1)
Index Cond: (archive = 32)
Total runtime: 10724.122 ms
(15 rows)
Time: 10726.444 ms
This is likely addressable after bug 758258