Merge lp:~julian-edwards/launchpad/slow-deathrow into lp:launchpad

Proposed by Julian Edwards
Status: Merged
Approved by: Brad Crittenden
Approved revision: no longer in the source branch.
Merged at revision: 11693
Proposed branch: lp:~julian-edwards/launchpad/slow-deathrow
Merge into: lp:launchpad
Diff against target: 23 lines (+2/-4)
1 file modified
lib/lp/archivepublisher/deathrow.py (+2/-4)
To merge this branch: bzr merge lp:~julian-edwards/launchpad/slow-deathrow
Reviewer Review Type Date Requested Status
Julian Edwards (community) release-critical Approve
Brad Crittenden (community) code Approve
Review via email: mp+37942@code.launchpad.net

Commit message

Fix a slow query in process-death-row that PG8.4 hates that 8.3 didn't.

Description of the change

After PG8.4 was put in production the process-death-row script starting
failing. It turns out to be a bad query that 8.3 let us get away with - this
branch fixes the query to remove an unncessaary table join.

To post a comment you must log in.
Revision history for this message
Brad Crittenden (bac) :
review: Approve (code)
Revision history for this message
Julian Edwards (julian-edwards) wrote :

This is ok to land r-c since it's already cowboyed.

review: Approve (release-critical)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/archivepublisher/deathrow.py'
2--- lib/lp/archivepublisher/deathrow.py 2010-08-23 16:51:11 +0000
3+++ lib/lp/archivepublisher/deathrow.py 2010-10-08 10:20:58 +0000
4@@ -120,8 +120,7 @@
5 SourcePackagePublishingHistory.scheduleddeletiondate < %s AND
6 SourcePackagePublishingHistory.dateremoved IS NULL AND
7 NOT EXISTS (
8- SELECT 1 FROM sourcepackagepublishinghistory as spph,
9- sourcepackagerelease as spr
10+ SELECT 1 FROM sourcepackagepublishinghistory as spph
11 WHERE
12 SourcePackagePublishingHistory.sourcepackagerelease =
13 spph.sourcepackagerelease AND
14@@ -136,8 +135,7 @@
15 BinaryPackagePublishingHistory.scheduleddeletiondate < %s AND
16 BinaryPackagePublishingHistory.dateremoved IS NULL AND
17 NOT EXISTS (
18- SELECT 1 FROM binarypackagepublishinghistory as bpph,
19- binarypackagerelease as bpr
20+ SELECT 1 FROM binarypackagepublishinghistory as bpph
21 WHERE
22 BinaryPackagePublishingHistory.binarypackagerelease =
23 bpph.binarypackagerelease AND