--- id: fix-path-index-locale name: Fix Path Index for LIKE Pattern Matching status: completed depends_on: [] scope: narrow risk: low impact: isolated level: implementation --- ## Description W17: `WHERE path LIKE 'implementation/%'` can use a B-tree index only with the `C` locale or `text_pattern_ops`. With the default locale, LIKE pattern matching may not use the index, causing sequential scans on the tasks table. Specify that the `path` index should use `text_pattern_ops`: `CREATE INDEX idx_tasks_path ON tasks (path text_pattern_ops)`, or document the locale dependency. ## Acceptance Criteria - [ ] `tasks.md` path index uses `text_pattern_ops` in the spec - [ ] `table-reference.md` indexes section updated for `idx_tasks_path` with `text_pattern_ops` - [ ] Note added about locale dependency (default locale vs C locale) ## References - docs/reviews/storage-architecture-review-2026-04-21.md#W17 - docs/architecture/storage/tasks.md:83, :101 ## Notes > To be filled by implementation agent ## Summary > To be filled on completion