PostgreSQL · Query performance · L1
← Query performance across the stack
A checkout/search endpoint suddenly got 20–50× slower. CPU is only moderate, but queries hang for a long time.
Checkout and search latency jumped 20–50×. CPU stays moderate, yet individual queries sit for seconds. The slowdown started after a new filter shipped, and it scales with table size.
A new WHERE / ORDER BY predicate isn't covered by any index, so the planner falls back to a Seq Scan over a large table. Every request now reads millions of rows.
Generate an orders table of 5–20M rows and an endpoint filtering by user_id / status / created_at, then drop the index that makes it fast. The learner sees the real plan and the real latency.
Prototype — scenario content is a preview; the live sandbox is not wired up.