← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~lifeless/launchpad/bug-618406 into lp:launchpad/db-devel

 

Robert Collins has proposed merging lp:~lifeless/launchpad/bug-618406 into lp:launchpad/db-devel.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #618406 in Launchpad itself: "Distribution:+bugs-index time outs"
  https://bugs.launchpad.net/launchpad/+bug/618406

For more details, see:
https://code.launchpad.net/~lifeless/launchpad/bug-618406/+merge/55680
-- 
https://code.launchpad.net/~lifeless/launchpad/bug-618406/+merge/55680
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~lifeless/launchpad/bug-618406 into lp:launchpad/db-devel.
=== added file 'database/schema/patch-2208-59-1.sql'
--- database/schema/patch-2208-59-1.sql	1970-01-01 00:00:00 +0000
+++ database/schema/patch-2208-59-1.sql	2011-03-31 05:25:53 +0000
@@ -0,0 +1,9 @@
+-- Copyright 2011 Canonical Ltd.  This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+
+SET client_min_messages=ERROR;
+
+-- Poor index, superceded in -2.
+DROP INDEX bugtask__product__heat__idx;
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 59, 1);

=== added file 'database/schema/patch-2208-59-2.sql'
--- database/schema/patch-2208-59-2.sql	1970-01-01 00:00:00 +0000
+++ database/schema/patch-2208-59-2.sql	2011-03-31 05:25:53 +0000
@@ -0,0 +1,13 @@
+-- Copyright 2011 Canonical Ltd.  This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+
+SET client_min_messages=ERROR;
+
+-- Better indices from qa testing.
+
+-- product context, id needed to override bitmap index plas.
+CREATE INDEX bugtask__product__heat__id__idx ON bugtask USING btree (product, heat DESC, id) WHERE product IS NOT NULL;
+-- And just distribution
+CREATE INDEX bugtask__distribution__heat__id__idx ON bugtask USING btree(distribution, heat DESC, id) WHERE distribution IS NOT NULL;
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 59, 2);


Follow ups