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

You are designing a data-retention and TTL strategy for a multi-tenant analytics database that needs to balance storage cost against query performance. How would you handle tenant isolation in the policy, roll cold data off to cheaper storage, respect regulatory retention constraints that may differ per tenant, and let queries transparently reach the cold data when they need to?

HardTechnical
65 practiced

A multi-tenant SaaS product runs many tenants on a shared database cluster. One tenant's workload suddenly causes I/O and CPU spikes that degrade performance for everyone else. Propose an architecture and operational plan to detect and isolate noisy tenants: logical isolation (schemas, row-level throttles), physical isolation (dedicated instances for the worst offenders), resource limits, and how you would think about cost and billing allocation.

EasyTechnical
73 practiced

Why does a database need connection pooling at scale, and what breaks without one? Explain how pool size affects latency and throughput, what a 'connection storm' is and how you would mitigate one, and give rules of thumb for sizing a pool for a service under high concurrency.

HardSystem Design
60 practiced

You need a materialized view or aggregated table that stays fresh within 10 minutes over a dataset ingesting about 1TB per day. How would you implement incremental refresh so you are not recomputing the whole view every time, what would partition-level refresh buy you, and what do you do when the underlying data gets corrected after the fact through a backfill?

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.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.