Commit f0eeb19
committed
perf(episodic): add idx_events_linked_id to prevent O(N) batch scans
Add `idx_events_linked_id` index to the `events` table in `EpisodicStore` to prevent O(N) full table scans during batch fetch queries filtering by `linked_id` (e.g., `WHERE linked_id IN (...)`). This provides significant speedups during operations such as `count_links_for_semantic_batch`.1 parent 61cba58 commit f0eeb19
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
95 | 99 | | |
96 | 100 | | |
97 | 101 | | |
| |||
0 commit comments