InterviewStack.io LogoInterviewStack.io

Database Performance Tuning and Scaling Questions

System-level performance work beyond a single query: configuration and resource tuning, capacity planning, handling large data volumes, and scaling read and write throughput. Covers identifying bottlenecks, growth management, and the vertical-versus-horizontal scaling decision. Tests whether a candidate can keep a database healthy as load grows.

MediumTechnical
67 practiced

Frontend reports intermittent 5-10 second request latencies. Traces point to occasional long-running PostgreSQL queries. Describe how you would triage: identify problematic queries, detect lock or contention issues, diagnose IO stalls, and find indexing problems. Include the SQL commands and Postgres views you would use and low-risk mitigation steps you can apply without downtime.

HardTechnical
68 practiced

A compaction job in production corrupted several chunks, causing loss of 72 hours of series for a subset of tenants. Walk through the incident response steps you would take as the SRE lead, including immediate mitigation, communication, root cause analysis, remediation, and long-term changes to prevent recurrence.

MediumTechnical
52 practiced

Explain how WAL (write-ahead log) retention and recovery interact with point-in-time recovery for a TSDB. How would you manage WAL retention for a system with heavy write rates and limited disk, while keeping an acceptable RPO?

EasyTechnical
56 practiced

You need to implement retention for two data classes: high-resolution metrics (keep 90 days at full resolution) and logs (keep 7 years, lower resolution). Describe how you'd implement retention and TTL policies across a TSDB and object storage tier, including any automation, lifecycle rules, and query implications for an SRE-run platform.

HardTechnical
52 practiced

Explain how buffer pool sizing in an OLTP database affects read latency and IO amplification when the working set is slightly larger than available RAM. Using cache-miss curves and cost modeling, propose a method to choose buffer size that minimizes total cost (memory cost + IO cost), and describe experiments to measure the 'knee' in the hit-rate curve.

Unlock Full Question Bank

Get access to all 47 Database Performance Tuning and Scaling interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.