← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wgrant/launchpad/bug-1267136 into lp:launchpad

 

William Grant has proposed merging lp:~wgrant/launchpad/bug-1267136 into lp:launchpad.

Commit message:
Add an index on SourcePackagePublishingHistory(datecreated, id) to make Distribution:+ppas work again.

Requested reviews:
  William Grant (wgrant): db
Related bugs:
  Bug #1267136 in Launchpad itself: "PPA Search not working"
  https://bugs.launchpad.net/launchpad/+bug/1267136

For more details, see:
https://code.launchpad.net/~wgrant/launchpad/bug-1267136/+merge/200934

Distribution:+ppas does summary queries for "5 most recent PPA uploads" and "5 PPAs with the most uploads in the last week". These each take around three seconds, but with an index to optimise the sort on (datecreated, id) they're just a few milliseconds. Let's do that.
-- 
https://code.launchpad.net/~wgrant/launchpad/bug-1267136/+merge/200934
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== added file 'database/schema/patch-2209-53-0.sql'
--- database/schema/patch-2209-53-0.sql	1970-01-01 00:00:00 +0000
+++ database/schema/patch-2209-53-0.sql	2014-01-08 23:13:17 +0000
@@ -0,0 +1,9 @@
+-- Copyright 2013 Canonical Ltd.  This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+
+SET client_min_messages=ERROR;
+
+CREATE INDEX sourcepackagepublishinghistory__datecreated__id__idx
+    ON sourcepackagepublishinghistory (datecreated, id);
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 53, 0);


References