perf(search): add index on transcription_blocks.document_id for lateral join

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-15 19:12:46 +02:00
committed by marcel
parent 2c64a6d8a4
commit bcb2898e5f

View File

@@ -0,0 +1,4 @@
-- Index on transcription_blocks.document_id to speed up the LATERAL join
-- used in DocumentService.findEnrichmentData (FTS match enrichment).
CREATE INDEX IF NOT EXISTS idx_transcription_blocks_document_id
ON transcription_blocks (document_id);