Merge lp:~wgrant/launchpad/flatten-bfj-0.5-lfa-indices into lp:launchpad

Proposed by William Grant
Status: Merged
Approved by: William Grant
Approved revision: no longer in the source branch.
Merged at revision: 16465
Proposed branch: lp:~wgrant/launchpad/flatten-bfj-0.5-lfa-indices
Merge into: lp:launchpad
Prerequisite: lp:~wgrant/launchpad/flatten-bfj-0-db
Diff against target: 27 lines (+23/-0)
1 file modified
database/schema/patch-2209-41-1.sql (+23/-0)
To merge this branch: bzr merge lp:~wgrant/launchpad/flatten-bfj-0.5-lfa-indices
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+146330@code.launchpad.net

Commit message

Add indices on the new LFA/BFJ FK references, otherwise deletions will be dreadfully slow.

Description of the change

Add indices on the new LFA/BFJ FK references, otherwise deletions will be dreadfully slow.

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'database/schema/patch-2209-41-1.sql'
2--- database/schema/patch-2209-41-1.sql 1970-01-01 00:00:00 +0000
3+++ database/schema/patch-2209-41-1.sql 2013-02-04 00:29:25 +0000
4@@ -0,0 +1,23 @@
5+-- Copyright 2013 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+CREATE INDEX binarypackagebuild__log__idx
11+ ON binarypackagebuild (log);
12+CREATE INDEX binarypackagebuild__upload_log__idx
13+ ON binarypackagebuild (upload_log);
14+CREATE INDEX binarypackagebuild__build_farm_job__idx
15+ ON binarypackagebuild (build_farm_job);
16+
17+CREATE INDEX sourcepackagerecipebuild__log__idx
18+ ON sourcepackagerecipebuild (log);
19+CREATE INDEX sourcepackagerecipebuild__upload_log__idx
20+ ON sourcepackagerecipebuild (upload_log);
21+CREATE INDEX sourcepackagerecipebuild__build_farm_job__idx
22+ ON sourcepackagerecipebuild (build_farm_job);
23+
24+CREATE INDEX translationtemplatesbuild__log__idx
25+ ON translationtemplatesbuild (log);
26+
27+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 41, 1);