Colin Watson has proposed merging 
~cjwatson/launchpad:db-stale-snap-charm-recipes into launchpad:master.

Commit message:
Add indexes for stale snap and charm recipes

Requested reviews:
  William Grant (wgrant): db
  Launchpad code reviewers (launchpad-reviewers): db

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/408996

These are (or will be) used by the `request_daily_builds` cron script.  A 
similar index for stale source package recipes was added in DB patch 2207-61-0.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
~cjwatson/launchpad:db-stale-snap-charm-recipes into launchpad:master.
diff --git a/database/schema/patch-2210-33-1.sql b/database/schema/patch-2210-33-1.sql
new file mode 100644
index 0000000..f7e1d6e
--- /dev/null
+++ b/database/schema/patch-2210-33-1.sql
@@ -0,0 +1,11 @@
+-- Copyright 2021 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 snap__is_stale__auto_build__idx
+    ON Snap(is_stale, auto_build);
+CREATE INDEX charmrecipe__is_stale__auto_build__idx
+    ON CharmRecipe(is_stale, auto_build);
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 33, 1);
_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to