← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:db-potmsgset-msgid-plural-idx into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:db-potmsgset-msgid-plural-idx into launchpad:master.

Commit message:
Index POTMsgSet(msgid_plural)

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #736005 in Launchpad itself: "POFile:+translate timeouts"
  https://bugs.launchpad.net/launchpad/+bug/736005

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

This is used by POFileMixIn._getTemplateSearchQuery.  Adding this index probably won't fix timeouts on its own, but it certainly helps avoid some full table scans.

This will need to be applied live with CONCURRENTLY.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:db-potmsgset-msgid-plural-idx into launchpad:master.
diff --git a/database/schema/patch-2210-01-5.sql b/database/schema/patch-2210-01-5.sql
new file mode 100644
index 0000000..f740a32
--- /dev/null
+++ b/database/schema/patch-2210-01-5.sql
@@ -0,0 +1,6 @@
+-- Copyright 2020 Canonical Ltd.  This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+
+CREATE INDEX potmsgset__msgid_plural__idx ON POTMsgSet (msgid_plural);
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 01, 5);