Merge lp:~stub/launchpad/db-cleanups into lp:launchpad/db-devel

Proposed by Stuart Bishop
Status: Merged
Approved by: Stuart Bishop
Approved revision: no longer in the source branch.
Merged at revision: 11660
Proposed branch: lp:~stub/launchpad/db-cleanups
Merge into: lp:launchpad/db-devel
Prerequisite: lp:~stub/launchpad/pending-db-changes
Diff against target: 53 lines (+44/-0)
2 files modified
database/schema/patch-2209-21-2.sql (+24/-0)
database/schema/patch-2209-21-3.sql (+20/-0)
To merge this branch: bzr merge lp:~stub/launchpad/db-cleanups
Reviewer Review Type Date Requested Status
Stuart Bishop (community) db Approve
Robert Collins db Pending
Launchpad code reviewers Pending
Review via email: mp+108145@code.launchpad.net

Commit message

Replace remaining GiST indexes with GIN

Description of the change

= Summary =

GIN indexes are faster for all of our use cases than GiST.

== Proposed fix ==

Replace all the GiST indexes with GIN indexes.

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

Waiting to confirm the BugTaskFlat.fti index change doesn't have any surprises.

Revision history for this message
Stuart Bishop (stub) :
review: Approve (db)
Revision history for this message
Stuart Bishop (stub) wrote :

2209-21-2 applied to production

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'database/schema/patch-2209-21-2.sql'
2--- database/schema/patch-2209-21-2.sql 1970-01-01 00:00:00 +0000
3+++ database/schema/patch-2209-21-2.sql 2012-05-31 11:26:25 +0000
4@@ -0,0 +1,24 @@
5+SET client_min_messages = ERROR;
6+
7+CREATE INDEX archive__fti__idx ON archive USING GIN (fti);
8+CREATE INDEX message__fti__idx ON message USING GIN (fti);
9+CREATE INDEX faq__fti__idx ON faq USING GIN (fti);
10+CREATE INDEX question__fti__idx ON question USING GIN (fti);
11+CREATE INDEX binarypackagerelease__fti__idx
12+ ON binarypackagerelease USING GIN (fti);
13+CREATE INDEX distroseriespackagecache__fti__idx
14+ ON distroseriespackagecache USING GIN (fti);
15+CREATE INDEX specification__fti__idx ON specification USING GIN (fti);
16+CREATE INDEX messagechunk__fti__idx ON messagechunk USING GIN (fti);
17+CREATE INDEX project__fti__idx ON project USING GIN (fti);
18+CREATE INDEX cve__fti__idx ON cve USING GIN (fti);
19+CREATE INDEX person__fti__idx ON person USING GIN (fti);
20+CREATE INDEX bug__fti__idx ON bug USING GIN (fti);
21+CREATE INDEX distributionsourcepackagecache__fti__idx
22+ ON distributionsourcepackagecache USING GIN (fti);
23+CREATE INDEX productreleasefile__fti__idx
24+ ON productreleasefile USING GIN (fti);
25+CREATE INDEX product__fti__idx ON product USING GIN (fti);
26+CREATE INDEX distribution__fti__idx ON distribution USING GIN (fti);
27+
28+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 21, 2);
29
30=== added file 'database/schema/patch-2209-21-3.sql'
31--- database/schema/patch-2209-21-3.sql 1970-01-01 00:00:00 +0000
32+++ database/schema/patch-2209-21-3.sql 2012-05-31 11:26:25 +0000
33@@ -0,0 +1,20 @@
34+SET client_min_messages = ERROR;
35+
36+DROP INDEX archive_fti;
37+DROP INDEX message_fti;
38+DROP INDEX faq_fti;
39+DROP INDEX question_fti;
40+DROP INDEX binarypackagerelease_fti;
41+DROP INDEX distroseriespackagecache_fti;
42+DROP INDEX specification_fti;
43+DROP INDEX messagechunk_fti;
44+DROP INDEX project_fti;
45+DROP INDEX cve_fti;
46+DROP INDEX person_fti;
47+DROP INDEX bug_fti;
48+DROP INDEX distributionsourcepackagecache_fti;
49+DROP INDEX productreleasefile_fti;
50+DROP INDEX product_fti;
51+DROP INDEX distribution_fti;
52+
53+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 21, 3);

Subscribers

People subscribed via source and target branches

to status/vote changes: