Merge lp:~deryck/launchpad/product-specification-sharing-policy-idx-1057617 into lp:launchpad

Proposed by Deryck Hodge
Status: Rejected
Rejected by: Deryck Hodge
Proposed branch: lp:~deryck/launchpad/product-specification-sharing-policy-idx-1057617
Merge into: lp:launchpad
Diff against target: 13 lines (+9/-0)
1 file modified
database/schema/patch-2209-31-2.sql (+9/-0)
To merge this branch: bzr merge lp:~deryck/launchpad/product-specification-sharing-policy-idx-1057617
Reviewer Review Type Date Requested Status
Stuart Bishop (community) db Needs Information
Robert Collins Pending
Review via email: mp+126728@code.launchpad.net

Commit message

Add db index for Product.specification_sharing_policy.

Description of the change

This adds an index for Product.specification_sharing_policy. It's one of a couple final branches to finish out the schema changes for Product.specification_sharing_policy. As I understand, this will be applied live, so I'm proposing for merge into lp:launchpad. If I misunderstood this process, please let me know.

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

The DB patch is fine, but we can't think why it is needed. This index is really only helpful for selecting all products with a particular policy in an arbitrary order, which might be useful for initial population of the column but probably not given the Product table doesn't have that many rows.

review: Needs Information (db)
Revision history for this message
Deryck Hodge (deryck) wrote :

Ah, fair point. I was thinking of selecting products by policy, but we don't actually need to do that. Sorry. Thanks for catching that. I'll reject the MP and drop the branch.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'database/schema/patch-2209-31-2.sql'
2--- database/schema/patch-2209-31-2.sql 1970-01-01 00:00:00 +0000
3+++ database/schema/patch-2209-31-2.sql 2012-09-27 16:42:21 +0000
4@@ -0,0 +1,9 @@
5+-- Copyright 2012 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 product__specicification_sharing_policy__idx
11+ ON Product(specification_sharing_policy);
12+
13+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 31, 2);