tutorials25 min read
Googlebot Arrived, the Database Fell Over: Finding a Missing Index with pg_stat_statements and EXPLAIN
Postgres CPU is at 100%, every endpoint waits for seconds, and the API itself is idle. We trace, step by step, how an innocent purchase counter on product pages scans 1.2 million rows, how Googlebot turns that into an outage, and how to add the index to a live table without locking it.