Sequential scan on orders (42M rows)
Query plan (evidence)Seq Scan on orders · 41,998,112 rows
Seq Scan on orders (cost=0.00..1,284,331.00 rows=41,998,112) Filter: ((customer_id = $1) AND (status = $2)) Rows Removed by Filter: 41,997,884
-- Built online — no write lock on the orders table
CREATE INDEX CONCURRENTLY idx_orders_customer_status
ON orders (customer_id, status)
INCLUDE (order_total, created_at);