On staging thats still bad.
Without the copy-paste noise:
SELECT COUNT(
DISTINCT DistributionSourcePackageCache.id)
FROM
BinaryPackageRelease
JOIN BinaryPackageBuild
ON BinaryPackageBuild.id = BinaryPackageRelease.build
JOIN DistroArchSeries
ON DistroArchSeries.id = BinaryPackageBuild.distro_arch_series
JOIN DistroSeries ON DistroSeries.id = DistroArchSeries.distroseries
JOIN SourcePackageRelease
ON SourcePackageRelease.id = BinaryPackageBuild.source_package_release
JOIN DistributionSourcePackageCache
ON DistributionSourcePackageCache.sourcepackagename
= SourcePackageRelease.sourcepackagename
WHERE
DistroSeries.distribution = 1
AND DistroSeries.releasestatus != 6
AND DistributionSourcePackageCache.archive IN (1, 534)
AND BinaryPackageRelease.binarypackagename = (
SELECT id FROM BinaryPackageName WHERE name='mplayer');
Time: 6831.607 ms
On staging thats still bad.
Without the copy-paste noise:
SELECT COUNT( rcePackageCache .id) elease ild.id = BinaryPackageRe lease.build ild.distro_ arch_series s.distroseries lease lease.id = BinaryPackageBu ild.source_ package_ release rcePackageCache rcePackageCache .sourcepackagen ame lease.sourcepac kagename distribution = 1 releasestatus != 6 rcePackageCache .archive IN (1, 534) lease.binarypac kagename = (
DISTINCT DistributionSou
FROM
BinaryPackageR
JOIN BinaryPackageBuild
ON BinaryPackageBu
JOIN DistroArchSeries
ON DistroArchSeries.id = BinaryPackageBu
JOIN DistroSeries ON DistroSeries.id = DistroArchSerie
JOIN SourcePackageRe
ON SourcePackageRe
JOIN DistributionSou
ON DistributionSou
= SourcePackageRe
WHERE
DistroSeries.
AND DistroSeries.
AND DistributionSou
AND BinaryPackageRe
SELECT id FROM BinaryPackageName WHERE name='mplayer');
Time: 6831.607 ms