Ruben Fiszel
65f0070fc0
fix: add partial index for fast failure filtering on runs page ( #8150 )
...
When failures are sparse (<1%), filtering by failure status on the runs
page required scanning millions of success rows. Add a partial index on
v2_job_completed (workspace_id, completed_at DESC) WHERE status IN
('failure', 'canceled') and switch ORDER BY to completed_at when
filtering failures, so Postgres walks the small partial index directly.
Benchmarked at 5.2M rows / 1% failure rate:
- LIMIT 30: 800ms -> 0.4ms (2000x faster)
- LIMIT 1000: 550ms -> 21ms (26x faster)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-28 18:18:34 +00:00
..
2026-02-08 12:55:51 +00:00
2026-02-28 07:39:27 +00:00
2026-01-27 11:52:24 +00:00
2026-02-10 11:30:39 +00:00
2026-02-28 18:18:34 +00:00
2026-02-28 07:08:02 +00:00
2026-02-21 05:29:36 +00:00
2026-02-25 12:05:22 +00:00
2026-02-11 10:31:03 +00:00
2026-02-28 18:18:34 +00:00
2026-02-18 17:35:33 +00:00
2026-02-26 14:03:46 +00:00
2026-02-25 09:04:05 +00:00
2026-01-09 07:29:07 +00:00
2026-02-27 13:59:14 +01:00
2026-02-11 10:31:03 +00:00
2026-02-11 10:31:03 +00:00
2026-02-11 10:31:03 +00:00
2026-02-25 12:05:22 +00:00
2026-02-10 16:49:25 +00:00
2026-02-21 04:50:24 +00:00
2026-02-27 13:59:14 +01:00
2026-02-28 18:18:34 +00:00
2026-02-21 05:29:36 +00:00
2026-02-11 10:31:03 +00:00
2026-02-26 14:03:46 +00:00
2026-02-25 12:05:22 +00:00
2026-02-25 15:06:12 +00:00
2026-02-07 22:12:55 +00:00
2026-02-14 22:42:01 +00:00
2026-02-16 23:36:41 +00:00
2026-02-28 07:39:27 +00:00
2025-12-10 15:35:26 +00:00
2026-02-27 13:59:14 +01:00
2026-02-12 23:02:36 +00:00
2026-02-26 10:34:10 +00:00
2026-02-25 09:01:59 +00:00
2026-02-18 12:24:45 +00:00
2026-02-26 08:45:37 +00:00
2025-12-16 19:07:19 +02:00
2026-02-10 23:34:15 +00:00
2026-02-28 07:03:15 +00:00
2026-02-18 17:27:15 +00:00
2026-02-18 12:24:45 +00:00
2026-02-17 00:06:56 +00:00
2026-02-27 13:59:14 +01:00
2026-02-20 16:28:40 +00:00
2026-02-26 14:03:46 +00:00
2026-02-27 13:59:14 +01:00
2026-02-25 12:05:22 +00:00
2026-02-25 09:01:59 +00:00
2026-02-25 09:01:59 +00:00
2026-02-25 12:05:22 +00:00
2026-02-25 09:01:59 +00:00
2026-02-25 12:05:22 +00:00
2026-02-25 09:01:59 +00:00
2026-02-26 08:36:10 +00:00
2026-02-25 09:01:59 +00:00
2026-02-25 12:05:22 +00:00
2026-02-25 12:05:22 +00:00
2026-02-28 07:08:02 +00:00
2026-02-19 10:56:41 +00:00
2026-02-28 07:08:02 +00:00
2026-02-28 07:08:02 +00:00
2026-02-28 07:00:19 +00:00
2026-02-27 06:54:33 +00:00
2026-01-29 01:44:40 +00:00
2025-11-15 11:56:45 +00:00
2026-02-04 11:39:16 +00:00
2026-02-20 17:01:49 +01:00
2026-02-12 07:19:44 +00:00
2026-02-23 17:50:37 +00:00
2026-02-22 14:16:52 +00:00
2026-02-12 13:19:05 +00:00
2026-02-27 06:54:33 +00:00