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: mp+340535@code.launchpad.net

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

Subscribers

People subscribed via source and target branches

to status/vote changes: