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

Proposed by Robert Collins
Status: Merged
Approved by: Robert Collins
Approved revision: no longer in the source branch.
Merged at revision: 10373
Proposed branch: lp:~lifeless/launchpad/bug-618406
Merge into: lp:launchpad/db-devel
Diff against target: 31 lines (+22/-0)
2 files modified
database/schema/patch-2208-59-1.sql (+9/-0)
database/schema/patch-2208-59-2.sql (+13/-0)
To merge this branch: bzr merge lp:~lifeless/launchpad/bug-618406
Reviewer Review Type Date Requested Status
Stuart Bishop (community) db Approve
Review via email: mp+55680@code.launchpad.net

Commit message

Better indices.

To post a comment you must log in.
Revision history for this message
Stuart Bishop (stub) wrote :

No need for two patches here, but whatever.

review: Approve (db)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== 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 @@
1-- Copyright 2011 Canonical Ltd. This software is licensed under the
2-- GNU Affero General Public License version 3 (see the file LICENSE).
3
4SET client_min_messages=ERROR;
5
6-- Poor index, superceded in -2.
7DROP INDEX bugtask__product__heat__idx;
8
9INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 59, 1);
010
=== 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 @@
1-- Copyright 2011 Canonical Ltd. This software is licensed under the
2-- GNU Affero General Public License version 3 (see the file LICENSE).
3
4SET client_min_messages=ERROR;
5
6-- Better indices from qa testing.
7
8-- product context, id needed to override bitmap index plas.
9CREATE INDEX bugtask__product__heat__id__idx ON bugtask USING btree (product, heat DESC, id) WHERE product IS NOT NULL;
10-- And just distribution
11CREATE INDEX bugtask__distribution__heat__id__idx ON bugtask USING btree(distribution, heat DESC, id) WHERE distribution IS NOT NULL;
12
13INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 59, 2);

Subscribers

People subscribed via source and target branches

to status/vote changes: