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, the vertical-versus-horizontal scaling decision, materialized views for expensive queries, and maintenance work such as vacuuming, index rebuilds, bulk loads, and safe schema changes on large tables. Tests whether a candidate can keep a database healthy as load grows.

HardTechnical
74 practiced

A high-throughput event-ingestion table needs a backpressure and throttling strategy so the database does not fall over when downstream consumers lag. How would you surface backpressure back to producers, what incremental throttling policy would you use, and how would you balance this against SLA requirements?

MediumSystem Design
74 practiced

Design a read-write splitting strategy for a relational database shared by multiple microservices. How is routing performed, how do you handle a caller that needs to read its own recent write, what are the connection-pooling implications, and what happens when a replica lags or the primary becomes unavailable?

MediumTechnical
70 practiced

Write PostgreSQL SQL to create a materialized view summarizing daily user metrics, and show how you would refresh it concurrently without blocking readers. What are the locking implications of a concurrent refresh, and how would you schedule refreshes to minimize impact on users?

MediumTechnical
53 practiced

Six months after a team introduced a denormalized summary table to speed up a read-heavy endpoint, you discover its counts have drifted out of sync with the source data because of missed updates. How would you investigate the drift, reconcile the data, and change the system so it does not happen again?

MediumTechnical
67 practiced

A production service is returning intermittent errors, and metrics show its database connection pool is occasionally hitting its max. How would you diagnose whether this is caused by leaking connections, an undersized pool, slow queries holding connections too long, or a sudden traffic spike? What database and application metrics or logs would you check, and what would you do to restore availability immediately?

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.