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
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.

MediumTechnical
73 practiced

You need to bulk-load 100 million rows into PostgreSQL with minimal downtime and minimal WAL bloat. Walk through your plan: how would you validate the data first, choose between COPY and row-by-row INSERT, decide whether to disable and rebuild indexes, consider partitioning or UNLOGGED tables, and tune settings like maintenance_work_mem and parallelism? What risks would you flag, and how would you confirm the load succeeded?

MediumTechnical
58 practiced

You need to add a column to a production table with hundreds of millions of rows, and you cannot take a long lock or cause a visible outage. Describe a safe approach: what technique would you use to make the change incrementally, how would a dual-write-and-backfill strategy work if you needed one, and how would you monitor and cap the impact on live traffic while it runs, including a way to back out if something goes wrong?

MediumTechnical
55 practiced

Your data warehouse runs a heavy nightly job at 2am that rebuilds summary tables, and by morning dashboards are still slow because the warehouse is doing background cleanup and vacuuming. How would you prioritize fixes to cut the morning latency: what operational changes, infrastructure changes, and query-level changes would you make, and how would you measure whether it worked?

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 40 Database Performance Tuning and Scaling interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.