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

You are sizing a cloud data warehouse cluster that ingests 1TB per day, with average query concurrency around 200 and peak concurrency near 2000 during a seasonal reporting crunch. How would you size the cluster, configure workload management so the peak does not starve other queries, and control cost during the peak window?

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.

HardTechnical
52 practiced

A database is showing high write latency and you suspect it is I/O-bound, but you are not certain. How would you collect evidence to distinguish a CPU-, memory-, or I/O-bound bottleneck, and what remediation would you consider for each, for example filesystem or I/O-scheduler tuning, batching writes, or reconsidering the storage engine?

MediumTechnical
54 practiced

An ingestion pipeline is feeding a data warehouse at high volume, and query performance is starting to suffer. You are weighing two approaches: scaling up the compute layer (more nodes or slots) versus pre-partitioning and pre-aggregating data as it is ingested. Compare the performance, cost, and operational-complexity trade-offs of each.

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?

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.