Database vs Application Bottleneck: How to Tell
Half of ‘the database is slow’ incidents are actually app-side. The four-question diagnostic gets you to the right team in minutes.
Why misdiagnosis happens
Symptoms look similar: slow responses; user errors. Root cause differs.
Wrong-team investigations waste hours; right-team in minutes.
Four-question diagnostic
- 1. Is the DB itself slow? (DB query latency)
- 2. Is the app waiting on DB? (app SQL wait time)
- 3. Is the app slow without DB? (non-DB code time)
- 4. Is the app waiting on something else? (network, downstream svc)
Metric pairs
DB-slow signature: query time high in DB metrics.
App-side signature: connection wait time high; pool exhausted.
Network signature: DNS or TLS time high.
Each pair distinguishes the case.
Common confusion
Pool exhaustion looks like DB-slow but is app-side.
Slow query plan after data growth looks app-side but is DB-side.
The diagnostic catches both.
Antipatterns
- Default to ‘DB problem.’ Misdiagnosis.
- No app-side timing metrics. Cannot distinguish.
- Restarting DB without diagnosis. Hides app-side root cause.
What to do this week
Three moves. (1) Apply this pattern to your slowest production endpoint. (2) Measure p99 before/after. (3) Document the win and ship the runbook so the team can reproduce.