gendesign/data/sql/116_obj2_multi_feature_matcher.sql
lekss361 2bd80c5719
All checks were successful
Deploy / changes (push) Successful in 5s
Deploy / build-backend (push) Successful in 27s
Deploy / build-frontend (push) Has been skipped
Deploy / build-worker (push) Successful in 28s
Deploy / deploy (push) Successful in 47s
fix(obj-2): trim migration 116 to GIST index only — INSERT CTE timed out in deploy (#326)
2026-05-17 20:21:58 +00:00

15 lines
804 B
SQL

-- 116_obj2_multi_feature_matcher.sql (HOTFIX — INSERT step deferred)
-- Issue #307 OBJ-2.
--
-- Original version did INSERT through a 89M-cost CROSS JOIN LATERAL CTE that
-- timed out during deploy. Hotfix keeps только the GIST trgm index (this is
-- the load-bearing change for downstream queries — competitors fuzzy match,
-- objective_complex_mapping reverse matching).
--
-- Actual multi-feature INSERT was already done inline on 2026-05-17
-- (+13 mappings: 129 → 142). Remaining auto-accept candidates (~50-100 at
-- composite >= 0.75) will be applied via separate migration 117 after
-- the candidate query is pre-materialized to avoid full LATERAL scan.
CREATE INDEX IF NOT EXISTS objective_lots_project_name_trgm_idx
ON objective_lots USING gist (project_name gist_trgm_ops);