Single query latency spike
Your task
A customer-facing analytics dashboard on Postgres started loading in 12s instead of 300ms at 11:00, and a handful of pages now 504. pg_stat_statements shows one query, a filter on tickets WHERE org_id = 1 AND created_at > 2 ORDER BY created_at DESC LIMIT 50, jumped from 5ms mean to 4s mean and is now the top query by total time. A large new enterprise customer was onboarded yesterday with ~30M tickets, 10x the next biggest org. No code or schema changed. How do you triage and fix?
It covers
- Slow query
- Missing index