← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~ilasc/launchpad:db-git-repo-repack-indexes into launchpad:db-devel

 

Ioana Lasc has proposed merging ~ilasc/launchpad:db-git-repo-repack-indexes into launchpad:db-devel.

Commit message:
Add GitRepository(loose_object_count, pack_count) index

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~ilasc/launchpad/+git/launchpad/+merge/399656
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~ilasc/launchpad:db-git-repo-repack-indexes into launchpad:db-devel.
diff --git a/database/schema/patch-2210-28-0.sql b/database/schema/patch-2210-28-0.sql
new file mode 100644
index 0000000..ea2ed4f
--- /dev/null
+++ b/database/schema/patch-2210-28-0.sql
@@ -0,0 +1,10 @@
+-- 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 gitrepository__loose_object_count__pack_count__idx
+ON GitRepository(loose_object_count, pack_count)
+WHERE status = 2;
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 28, 0);