launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #11821
[Merge] lp:~stevenk/launchpad/buildfarmjob-index-redux into lp:launchpad
Steve Kowalik has proposed merging lp:~stevenk/launchpad/buildfarmjob-index-redux into lp:launchpad.
Requested reviews:
Robert Collins (lifeless): db
Stuart Bishop (stub): db
For more details, see:
https://code.launchpad.net/~stevenk/launchpad/buildfarmjob-index-redux/+merge/123854
The index that was created in https://code.launchpad.net/~stevenk/launchpad/buildfarmjob-index/+merge/123675 does solve the main case of Builder:+history, and makes the page performant. The page also allows the user to filter by status, and the query to filter by BuildFarmJob.status results in a table scan. Let's add another index that looks like the existing one but adds status into the mix.
--
https://code.launchpad.net/~stevenk/launchpad/buildfarmjob-index-redux/+merge/123854
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== added file 'database/schema/patch-2209-27-4.sql'
--- database/schema/patch-2209-27-4.sql 1970-01-01 00:00:00 +0000
+++ database/schema/patch-2209-27-4.sql 2012-09-11 22:47:21 +0000
@@ -0,0 +1,8 @@
+-- Copyright 2012 Canonical Ltd. This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+
+SET client_min_messages=ERROR;
+
+CREATE INDEX buildfarmjob__builder__status__date_finished__id__idx ON BuildFarmJob(builder, status, date_finished DESC, id) WHERE builder IS NOT NULL;
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 27, 4);
Follow ups