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.

HardTechnical
31 practiced

A recent migration inadvertently caused write amplification and IOPS spikes on your primary database, and performance has degraded severely. Walk through how you'd quickly diagnose the root cause, what immediate steps you'd take to protect the primary from further damage, and how you'd confirm your mitigation actually worked.

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.

EasyTechnical
43 practiced

List and explain five key metrics you would monitor to assess the health and performance of a production relational database. For each metric, describe one alert condition you might set and why.

EasyTechnical
38 practiced

Explain what the PostgreSQL view pg_stat_activity shows and how you'd use it to identify long-running queries and blocking relationships. Provide an example SQL query that lists sessions running longer than 5 minutes including pid, state, wait_event, query_start, client_addr, and application_name, and describe how you would interpret typical results.

MediumSystem Design
42 practiced

You've just inherited on-call ownership of a production relational database that's never had real monitoring set up. What would you actually put on a dashboard and watch, and how would you go about setting alert thresholds so the on-call rotation gets paged for real problems without drowning in noise?

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.