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.

EasyTechnical
69 practiced

A dashboard query is slow because it aggregates a lot of data on every request. You are deciding whether to speed it up with a well-chosen index or with a materialized view. Explain the difference between the two approaches, when you would reach for a materialized view instead of adding an index, and what operational costs, like refresh cadence and extra storage, you would need to explain to stakeholders.

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
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
56 practiced

A database is projected to grow 5x in storage and IOPS over the next 12 months. Walk through how you would build a capacity plan for it: how you would model the growth, what safety margins you would build in, how you would project cost, and what automation or alerting you would put in place so capacity never becomes an unplanned outage.

EasyTechnical
64 practiced

Denormalization can improve read performance, but it is not free. When would you propose denormalizing part of a schema, and what are the trade-offs: write complexity, data-consistency risk, storage overhead, and the ongoing burden of keeping the denormalized copy in sync?

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.