Merge lp:~cjwatson/launchpad/db-recipe-build-ordering into lp:launchpad/db-devel

Proposed by Colin Watson
Status: Merged
Merged at revision: 13812
Proposed branch: lp:~cjwatson/launchpad/db-recipe-build-ordering
Merge into: lp:launchpad/db-devel
Diff against target: 22 lines (+18/-0)
1 file modified
database/schema/patch-2209-73-1.sql (+18/-0)
To merge this branch: bzr merge lp:~cjwatson/launchpad/db-recipe-build-ordering
Reviewer Review Type Date Requested Status
William Grant db Approve
Stuart Bishop db Pending
Review via email:

Commit message

Add NULLS LAST to SourcePackageRecipe.*builds indexes.

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) :
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-2209-73-1.sql'
2--- database/schema/patch-2209-73-1.sql 1970-01-01 00:00:00 +0000
3+++ database/schema/patch-2209-73-1.sql 2018-03-02 18:02:42 +0000
4@@ -0,0 +1,18 @@
5+-- Copyright 2018 Canonical Ltd. This software is licensed under the
6+-- GNU Affero General Public License version 3 (see the file LICENSE).
8+SET client_min_messages=ERROR;
10+DROP INDEX sourcepackagerecipebuild__recipe__started__finished__created__idx;
11+DROP INDEX sourcepackagerecipebuild__recipe__started__finished__idx;
13+CREATE INDEX sourcepackagerecipebuild__recipe__started__finished__created__idx
14+ ON SourcePackageRecipeBuild (
15+ recipe, GREATEST(date_started, date_finished) DESC NULLS LAST,
16+ date_created DESC, id DESC);
17+CREATE INDEX sourcepackagerecipebuild__recipe__started__finished__idx
18+ ON SourcePackageRecipeBuild (
19+ recipe, GREATEST(date_started, date_finished) DESC NULLS LAST,
20+ id DESC);
22+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 73, 1);


People subscribed via source and target branches

to status/vote changes: