- A1: Rewrite overlap query from OR-based predicate to canonical form
(end_time > start AND start_time < end) which is index-friendly
- A2: Add composite (camera, start_time, end_time) and (camera, end_time)
indexes via migration to support the new overlap predicate
- A3: Add bounded LRU in-process cache for historical VOD mapping
payloads to avoid repeated DB + assembly work on re-opens
- A4: Extract vod_ts internals into query/normalize/payload helpers
in frigate/api/vod.py for benchmarking and future swapability
- Also update the recording_clip download path to use the same
canonical overlap predicate
https://claude.ai/code/session_01XeVxvSk9ywyPBR288ZZXWE