Merge lp:~wgrant/launchpad/tm-performance-0-db into lp:launchpad/db-devel

Proposed by William Grant
Status: Merged
Merged at revision: 12941
Proposed branch: lp:~wgrant/launchpad/tm-performance-0-db
Merge into: lp:launchpad/db-devel
Diff against target: 20 lines (+16/-0)
1 file modified
database/schema/patch-2209-62-1.sql (+16/-0)
To merge this branch: bzr merge lp:~wgrant/launchpad/tm-performance-0-db
Reviewer Review Type Date Requested Status
Stuart Bishop (community) db Approve
Review via email: mp+251207@code.launchpad.net

Commit message

Denormalise msgid and suggestiveness through a few Translations tables.

Description of the change

Denormalise msgid and suggestiveness through a few Translations tables.

TranslationTemplateItem gains msgid_singular and msgid_plural from POTMsgSet, for POFile:+translate filter performance.

TranslationMessage gains the msgid_* and suggestive columns for suggestion performance. POTMsgSet grows a suggestive flag too, to optimise TM cache updates. POTemplate.suggestive replaces the existing SuggestivePOTemplate for consistency.

To post a comment you must log in.
Revision history for this message
Stuart Bishop (stub) wrote :

Ok.

review: Approve (db)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'database/schema/patch-2209-62-1.sql'
2--- database/schema/patch-2209-62-1.sql 1970-01-01 00:00:00 +0000
3+++ database/schema/patch-2209-62-1.sql 2015-03-06 06:35:08 +0000
4@@ -0,0 +1,16 @@
5+-- Copyright 2015 Canonical Ltd. This software is licensed under the
6+-- GNU Affero General Public License version 3 (see the file LICENSE).
7+
8+SET client_min_messages=ERROR;
9+
10+ALTER TABLE translationtemplateitem
11+ ADD COLUMN msgid_singular integer REFERENCES pomsgid,
12+ ADD COLUMN msgid_plural integer REFERENCES pomsgid;
13+ALTER TABLE potemplate ADD COLUMN suggestive bool;
14+ALTER TABLE potmsgset ADD COLUMN suggestive bool;
15+ALTER TABLE translationmessage
16+ ADD COLUMN msgid_singular integer REFERENCES pomsgid,
17+ ADD COLUMN msgid_plural integer REFERENCES pomsgid,
18+ ADD COLUMN suggestive bool;
19+
20+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 62, 1);

Subscribers

People subscribed via source and target branches

to status/vote changes: