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.

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?

EasyTechnical
62 practiced

You are building a monitoring dashboard for a production database. What are the 8 to 10 metrics you would include, covering resource utilization, replication, query performance, and capacity? Why does each one matter, and what alert thresholds would you set for them?

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?

MediumTechnical
57 practiced

Serverless functions in your stack open many short-lived database connections, and you are saturating the database's connection limit under load. What patterns would you use to minimize the connection count while preserving throughput and low latency (for example, an external pooler, a proxy such as RDS Proxy, or connection reuse strategies), and what are the trade-offs of each?

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?

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.