Merge ~ilasc/launchpad:db-git-repo-repack-indexes into launchpad:master

Proposed by Ioana Lasc
Status: Merged
Approved by: Ioana Lasc
Approved revision: 4c81a5b5a925b09653918dbf1c3ec304a3b30bf5
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~ilasc/launchpad:db-git-repo-repack-indexes
Merge into: launchpad:master
Diff against target: 15 lines (+9/-0)
1 file modified
database/schema/patch-2210-28-0.sql (+9/-0)
Reviewer Review Type Date Requested Status
William Grant db Approve
Colin Watson (community) Approve
Review via email: mp+399660@code.launchpad.net

Commit message

Add GitRepository(loose_object_count, pack_count) index

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

LGTM, just tiny nits. Adding William for a second DB review as usual.

review: Approve
Revision history for this message
William Grant (wgrant) wrote :

What is the purpose of the status filter?

review: Needs Information (db)
Revision history for this message
Ioana Lasc (ilasc) wrote :

Thanks Colin.

William the purpose of the status filter is to target only available repositories, extra precaution.

Revision history for this message
William Grant (wgrant) wrote :

There should be very few repositories that don't have that status. I think a partial index here is more of a trap than a positive, so I'd remove the status filter.

Revision history for this message
Ioana Lasc (ilasc) wrote :

Makes sense, thanks William, done, MP ready for another look.

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
1diff --git a/database/schema/patch-2210-28-0.sql b/database/schema/patch-2210-28-0.sql
2new file mode 100644
3index 0000000..8cd7afb
4--- /dev/null
5+++ b/database/schema/patch-2210-28-0.sql
6@@ -0,0 +1,9 @@
7+-- Copyright 2021 Canonical Ltd. This software is licensed under the
8+-- GNU Affero General Public License version 3 (see the file LICENSE).
9+
10+SET client_min_messages=ERROR;
11+
12+CREATE INDEX gitrepository__loose_object_count__pack_count__idx
13+ ON GitRepository(loose_object_count, pack_count);
14+
15+INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 28, 0);

Subscribers

People subscribed via source and target branches

to status/vote changes: