Database Firefighting: Six Production Scenarios

An on-call playbook: symptoms → diagnosis (real Postgres/MySQL queries and metrics) → fixes in order of cost, for the six database incidents interviewers love to ask about.

About 90 minutes · 15 exam questions · 9 interview questions · 2 code labs

What you will learn

  1. The triage loop: how senior engineers approach any DB incident
  2. Scenario 1 — "The database is suddenly slow"
  3. Scenario 2 — "DB CPU is pinned at 90–100%"
  4. Scenario 3 — "Connections exhausted"
  5. Scenario 4 — "A table has 500M+ rows and everything on it is slow"
  6. Scenario 5 — "One shard is overloaded"
  7. Scenario 6 — "Replication lag keeps increasing"
  8. After the fire: guardrails and the postmortem

Previous: Partitioning, Sharding & Zero-Downtime Migration · Next: Inside PostgreSQL: The Life of a Write and a Read