Commit 5e01f10
committed
Fixes #27158: restore tag_usage prefix-LIKE index on Postgres
The 1.11.0 perf migration (#23054) added four `WHERE state = 1` partial
indexes on tag_usage; #24063 dropped the matching `state = 1` predicate
from getTagsInternalByPrefix (Suggested-state rows are valid for both
classification and glossary derivation), leaving every partial index
inapplicable. Postgres fell back to a parallel seq scan; MySQL was
unaffected because its 1.11.0 indexes were never partial.
Adds a non-partial single-col btree on targetfqnhash_lower (mirrors
MySQL's idx_targetfqnhash_lower) and rebuilds the four partials as
non-partial -- same shape, same INCLUDE columns, predicate coupling
removed so future query changes can't silently invalidate them.
Verified end-to-end against a local Postgres with 50k rows: seq scan
reproduced before the fix (matches reporter's EXPLAIN), bitmap index
scan after, both for inline and prepared-statement paths.1 parent f52cafd commit 5e01f10
1 file changed
Lines changed: 27 additions & 0 deletions
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
0 commit comments