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
1=== added file 'database/schema/patch-2208-59-1.sql'
2--- database/schema/patch-2208-59-1.sql 1970-01-01 00:00:00 +0000
3+++ database/schema/patch-2208-59-1.sql 2011-03-31 05:25:53 +0000
4@@ -0,0 +1,9 @@
5+-- Copyright 2011 Canonical Ltd. This software is licensed under the
6+-- GNU Affero General Public License version 3 (see the file LICENSE).
7+
8+SET client_min_messages=ERROR;
9+
10+-- Poor index, superceded in -2.
11+DROP INDEX bugtask__product__heat__idx;
12+
13+INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 59, 1);
14
15=== added file 'database/schema/patch-2208-59-2.sql'
16--- database/schema/patch-2208-59-2.sql 1970-01-01 00:00:00 +0000
17+++ database/schema/patch-2208-59-2.sql 2011-03-31 05:25:53 +0000
18@@ -0,0 +1,13 @@
19+-- Copyright 2011 Canonical Ltd. This software is licensed under the
20+-- GNU Affero General Public License version 3 (see the file LICENSE).
21+
22+SET client_min_messages=ERROR;
23+
24+-- Better indices from qa testing.
25+
26+-- product context, id needed to override bitmap index plas.
27+CREATE INDEX bugtask__product__heat__id__idx ON bugtask USING btree (product, heat DESC, id) WHERE product IS NOT NULL;
28+-- And just distribution
29+CREATE INDEX bugtask__distribution__heat__id__idx ON bugtask USING btree(distribution, heat DESC, id) WHERE distribution IS NOT NULL;
30+
31+INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 59, 2);

Subscribers

People subscribed via source and target branches

to status/vote changes: