Stale Statistics & The Catastrophic Nested Loop
After a bulk load of 500,000 orders, stale table statistics tell the planner the table still has 20 rows. The optimizer picks a **Nested Loop Join** instead of a Hash Join—turning a 40 ms query into a 14-second CPU fire.
watch:Whenever `EXPLAIN ANALYZE` shows a 100× gap between `estimated rows` and `actual rows`, stale statistics are steering the planner wrong.