Files
apex-public/internal/store/migrations/005_eval_indexes.sql
T
2026-07-06 11:05:50 -04:00

5 lines
274 B
SQL

-- Supports EvalModel.loadPending: filters jobs by archived, orders by discovered_at.
-- Without this, a table scan of jobs is required every time the Evaluate tab refreshes.
CREATE INDEX IF NOT EXISTS idx_jobs_archived_discovered
ON jobs(archived, discovered_at DESC);