Files
windmill/backend/windmill-api/src
Ruben Fiszel d4673c2e91 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
..
2025-06-02 22:12:33 +02:00
2025-06-02 22:12:33 +02:00
2025-10-16 09:19:44 +00:00
2025-06-02 22:12:33 +02:00
nit
2025-12-15 20:35:51 +00:00
2026-02-12 23:02:05 +00:00
2025-06-02 22:12:33 +02:00
2024-04-04 04:16:53 +02:00
2026-02-12 10:53:27 +00:00
2026-02-11 06:44:10 +00:00
2025-06-02 22:12:33 +02:00
2026-02-11 06:44:10 +00:00
2025-09-04 22:05:22 +00:00
2025-06-02 22:12:33 +02:00
2025-06-02 22:12:33 +02:00
2025-06-02 22:12:33 +02:00
2025-06-02 22:12:33 +02:00
2025-06-02 22:12:33 +02:00
nit
2025-09-11 21:57:56 +00:00
2026-02-16 15:52:02 +00:00
2026-02-11 06:44:10 +00:00