Merge lp:~wgrant/launchpad/bugsummary-v2-db-1 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Stuart Bishop |
Approved revision: | no longer in the source branch. |
Merged at revision: | 15605 |
Proposed branch: | lp:~wgrant/launchpad/bugsummary-v2-db-1 |
Merge into: | lp:launchpad |
Prerequisite: | lp:launchpad/db-devel |
Diff against target: |
30 lines (+26/-0) 1 file modified
database/schema/patch-2209-19-1.sql (+26/-0) |
To merge this branch: | bzr merge lp:~wgrant/launchpad/bugsummary-v2-db-1 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stuart Bishop (community) | db | Approve | |
Review via email: mp+113500@code.launchpad.net |
Commit message
Create some new indices on bugsummary, optimising rebuilds and coping with the new access_policy and deprecated fixed_upstream columns.
Description of the change
The main BugSummary queries come in two forms: finding all visible rows for a target without a tag, or finding all visible rows for a target with a tag. The product and productseries indices work well for this, but distribution, distroseries, distributionsou
Several of the old indices will be dropped at the conclusion of this work, and a new UNIQUE index will be created in the next branch.
This should be applied live shortly after 2209-19-0 is fastdowntimed.
Looks fine.
I assume all the _idx2 names are going to be renamed after other indexes are dropped.
It might be helpful for us to have a test helper that does "SET enable_seqscan=off; EXPLAIN (FORMAT JSON) $query;" and checks the result to make sure a particular index is being hit.