OpenMetadata/bootstrap/sql/migrations/native/1.12.7/postgres/postDataMigrationSQLScript.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

2 lines
64 B
MySQL
Raw Permalink Normal View History

Fixes #27158: ingestion slowdown from tag_usage seq-scan on Postgres (#27745) * 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. * Move #27158 tag_usage fix to 1.12.7 + add tagfqn_lower index Ship the fix in the 1.12.7 release line so customers on 1.12.x get it without waiting for 2.0.x. Also closes the second structural gap with MySQL: a non-partial single-col btree on tagfqn_lower mirroring MySQL's idx_tagfqn_lower (1.11.0). 1.12.8 directory removed; 1.12.7's existing schemaChanges.sql now carries the tag_usage indexes alongside the entity_extension migration. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 05:00:11 +00:00
-- Placeholder for 1.12.7 PostgreSQL post-data migration script