DB unfriendly implementation of RevisionAuthor email linker
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
High
|
Stuart Bishop |
Bug Description
The current implementation of RevisionAuthorE
A better implementation would be to calculate the set of linkable RevisionAuthor records, storing them in a temporary table. We can then perform the updates in chunks.
In __init__:
CREATE TEMPORARY TABLE LinkableRevisio
id serial PRIMARY KEY,
revision_author integer,
person integer);
INSERT INTO LinkableRevisio
SELECT RevisionAuthor.id, EmailAddress.person
WHERE RevisionAuthor.
AND lower(RevisionA
In __call__:
UPDATE RevisionAuthor
SET RevisionAuthor.
USING (
SELECT revision_author, person
FROM LinkableRevisio
WHERE id BETWEEN self.offset AND self.offset + chunk_size
) AS LinkableRevisio
Changed in launchpad-code: | |
assignee: | nobody → Stuart Bishop (stub) |
milestone: | none → 2.2.7 |
status: | New → Triaged |
Changed in launchpad-code: | |
milestone: | 2.2.7 → 2.2.8 |
Changed in launchpad-code: | |
importance: | Undecided → Medium |
milestone: | 3.0 → 3.1.10 |
Changed in launchpad-code: | |
milestone: | 3.1.11 → 3.1.13 |
Changed in launchpad-code: | |
milestone: | 3.1.13 → 10.01 |
Hi Stuart,
If this hasn't yet been done, or won't be done for 3.0, can you kick it to 3.1.10 please?