William Grant has proposed merging lp:~wgrant/launchpad/more-bpn-index into 
lp:launchpad.

Requested reviews:
  Stuart Bishop (stub): db

For more details, see:
https://code.launchpad.net/~wgrant/launchpad/more-bpn-index/+merge/124101

Getting a binary package by name in a distroarchseries without filtering on 
status is done in a few places. DistroSeriesBinaryPackage, 
DistroArchSeriesBinaryPackage and Archive.getBinaryPackageRelease are some 
examples. This branch adds an index to facilitate that.

The existing (archive, distroarchseries, status, binarypackagename) index is 
fairly quick, but the extra status traversal still makes it substantially 
slower than one with binarypackagename before status.
-- 
https://code.launchpad.net/~wgrant/launchpad/more-bpn-index/+merge/124101
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== added file 'database/schema/patch-2209-23-3.sql'
--- database/schema/patch-2209-23-3.sql	1970-01-01 00:00:00 +0000
+++ database/schema/patch-2209-23-3.sql	2012-09-13 05:43:20 +0000
@@ -0,0 +1,10 @@
+-- Copyright 2012 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 binarypackagepublishinghistory__archive__das__bpn__status__idx
+    ON binarypackagepublishinghistory
+    (archive, distroarchseries, binarypackagename, status);
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 23, 3);

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to