InterviewStack.io LogoInterviewStack.io

Database Troubleshooting and Diagnostics Questions

Systematic approaches and technical techniques for diagnosing database issues and restoring healthy operation. Topics include identifying symptoms, gathering diagnostic data from error logs and system views, analyzing slow queries with explain plans and profiling, diagnosing connection and authentication failures, detecting and resolving deadlocks and blocking, capacity and storage issues, replication and consistency problems, backup and restore verification, and corruption investigation. Candidates should be familiar with database specific diagnostic tools, monitoring and alerting metrics, indexing and query optimization strategies, and effective communication of findings to application and infrastructure teams.

HardSystem Design
42 practiced
How would you detect and remediate silent schema drift across many microservice-owned databases where services sometimes alter schemas independently? Propose detection tooling, reconciliation strategies, and governance policies (e.g., schema registry, migration CI gates) to prevent future drift.
EasyTechnical
35 practiced
You see frequent 'authentication failed' entries in the database logs. Outline step-by-step how you'd diagnose connection/authentication problems across the application, connection pooler (e.g., pgbouncer), network, and the database. Include commands/queries to check listener status, active connection counts, auth configuration, and how you would distinguish credential issues from network or rate-limiting problems.
MediumTechnical
30 practiced
A MySQL replica is lagging by 5 minutes and clients are reading stale data. List the diagnostic checks and exact commands you'd run (for example SHOW SLAVE STATUS, examine relay logs, check IO_THREAD and SQL_THREAD), likely root causes (long-running transaction, disk I/O, network), and safe corrective actions including catch-up strategies, rebootstrap, and when to resync from primary.
MediumTechnical
40 practiced
Explain how to use database wait_event and lock-wait statistics together with OS-level metrics to determine whether slow queries are CPU-bound or I/O-bound. Specify which DB and OS signals you would combine (e.g., wait_event types, iowait, context switches, disk latency) and how to form a confident diagnosis.
HardTechnical
30 practiced
Write SQL or well-documented pseudo-SQL that helps detect overlapping updates or possible lost updates on an orders table defined as orders(order_id, user_id, status, updated_at). Propose a query that surfaces orders with very close successive updates (e.g., multiple updates within 1 second) and explain assumptions about timestamp granularity and available auditing/logging.

Unlock Full Question Bank

Get access to hundreds of Database Troubleshooting and Diagnostics interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.