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.

HardTechnical
29 practiced
You are responsible for storage capacity planning across 500 TB of active database data. Describe how to forecast growth (per-tenant/shard), set soft and hard thresholds, automate provisioning and alerting, and run emergency procedures for storage pressure events. Include retention policy, compaction, and cost optimization considerations.
HardSystem Design
43 practiced
A distributed database uses semi-synchronous replication and during a network partition some replicas couldn't confirm writes to the primary. Propose an operational failover strategy that balances availability versus potential data loss, including automated decision criteria, quorum handling, promotion steps, and how to recover and reconcile replicas after the partition heals.
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 application-level race conditions, a migration script bug, or inconsistent data. Include SQL queries to locate duplicates, checks on migration scripts, and steps to mitigate impact in production.
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 on how you'd interpret the results to prioritize optimizations.
HardTechnical
43 practiced
Design an index maintenance and access strategy for a high-write table that must support both low-latency OLTP and occasional complex analytics. Address auto-vacuum tuning, index type selection (btree vs BRIN), partial/covering indexes, concurrent index builds, partitioning, and how to perform rolling maintenance without blocking application writes.

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.