-- Bound and index the persisted analysis reads used by the workbench and API. -- Safe to re-run after analysis.runs and analysis.results are provisioned. BEGIN; CREATE INDEX IF NOT EXISTS runs_created_at_run_id_idx ON analysis.runs(created_at DESC, run_id); CREATE INDEX IF NOT EXISTS results_run_created_at_result_id_idx ON analysis.results(run_id, created_at DESC, result_id DESC); COMMIT;