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.

EasyTechnical
40 practiced

Write a PostgreSQL SQL query that lists the top 5 queries by average duration in the last 24 hours using pg_stat_statements. Include columns: query, calls, total_time, mean_time, and max_time. Provide the SQL and a short explanation of how you'd interpret the results to prioritize optimization work.

MediumTechnical
43 practiced

On a SQL Server instance, your transaction log is growing unexpectedly large and causing disk pressure. Explain how you'd diagnose the root cause, which DMVs or commands you'd run to investigate, and describe safe steps to reduce the log size without risking data loss.

HardTechnical
36 practiced

You've observed intermittent Elasticsearch cluster issues: shard imbalance, long GC pauses, and slow merges causing query timeouts. Walk through your diagnostic steps and the metrics you'd examine to isolate the cause, propose remediation strategies you'd consider, and describe longer-term design changes you'd make to avoid recurrence.

HardTechnical
36 practiced

A production RocksDB-backed key-value store uses a Bloom filter to cut down on unnecessary SST file lookups, but observability shows its false-positive rate has crept an order of magnitude higher than expected. Walk through how you'd debug this: what you'd look at first, what the plausible root causes are given how a Bloom filter actually works, and what you'd do immediately to limit the impact on latency and disk I/O while you dig further.

MediumTechnical
30 practiced

A database replica, same-region or cross-region, is falling further and further behind the primary, and clients reading from it are seeing stale data. Walk through how you'd diagnose the lag: what you'd check first, the commands or queries you'd run to see how far behind it is and why, the most likely root causes, and how you'd decide between waiting it out, intervening, or resyncing from the primary.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.