Database Monitoring, Troubleshooting, and Diagnostics Questions

Observing and fixing databases in production: health checks, metrics and alerting, and diagnosing common failures like slow queries, lock contention, replication lag, resource exhaustion, and data-integrity incidents such as duplicate keys or lost updates after a crash or migration. Covers a systematic troubleshooting method under incident pressure. Tests operational instincts distinct from design knowledge.

MediumTechnical
30 practiced

You observe growing lock contention and many blocked transactions causing user-visible slowdowns. Walk through diagnostic steps to identify blocking chains and the root blocking session in PostgreSQL or MySQL. Include example SQL or commands to find blockers, how to interpret the lock types you find, and safe remediation steps to resolve the blocking without violating data consistency.

HardTechnical
37 practiced

An urgent rollback was required because a query plan produced by a recent statistics update caused severe latency. Describe how you'd identify which statistics change led to the plan regression, how you'd reproduce the regression, and what your options would be to fix it without introducing a new one.

MediumTechnical
35 practiced

An application started throwing intermittent 'duplicate key value violates unique constraint' errors after a migration. Outline how you'd determine whether this is due to an application-level race condition, a migration script bug, or genuinely inconsistent data. Include SQL queries to locate the duplicates, checks you'd run on the migration script, and steps to mitigate impact in production while you investigate.

MediumTechnical
31 practiced

You're operating a RocksDB-backed OLTP service (LSM). Query and write latencies spike during compaction windows. Describe the debugging steps, key metrics to collect, and immediate mitigations you can apply without changing client behavior. Include long-term changes you might make.

EasyTechnical
36 practiced

Given a MySQL slow query log entry, explain what each field means and how you'd use those logs to prioritize tuning work. Describe how to enable slow query logging safely in production, what pitfalls to watch out for, and how to correlate slow log entries with application traces.

Unlock Full Question Bank

Get access to all 37 Database Monitoring, Troubleshooting, and Diagnostics interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.