Scrivio Interview library
LeadershipPrincipal5 min read · updated 12 November 2026

Your cloud database bill grows about 60 percent a year, and teams usually respond to slow queries by moving to larger instances. How would you change the organisation's approach to database performance and cost over the next few years?

I would make database cost and performance visible per service and per query family, with named owners, and fund performance engineering skills such as query, schema and index design so that bigger hardware stops being the default answer. Large instance changes would pass a light review gate that asks for evidence the workload was analysed, analytics and search would move off the transactional database onto stores built for them, and progress would be tracked as cost per business unit of work, such as cost per order.

Why this question is asked

A database bill that grows 60 percent a year roughly doubles every 16 months and is ten times larger in five years. Much of that growth is usually not caused by the business growing; it is caused by a habit. Moving to a larger instance is fast, needs no code change and fixes the symptom, so teams keep doing it, while the slow queries and missing indexes remain. Interviewers ask this leadership question to see whether we can change incentives and skills across an organisation without blocking teams. In this answer, we will see why upsizing became the default, make cost visible, build skills, add a review gate, move workloads to the right stores, and measure efficiency over time.

1Why Bigger Instances Became the Default

A team sees a slow endpoint during a busy week. Fixing the cause means reading plans, maybe changing a schema or a query, testing on production-sized data and coordinating a migration. Clicking to the next instance size takes ten minutes and costs money that appears in someone else's budget. The rational choice for the team is the bigger instance, and nobody is accountable for the bill as a whole.

Hardware is also a weak fix for many problems. A query doing a sequential scan of 50 million rows on every request scales with data, so a bigger instance buys a few months until the data grows again. The bill keeps compounding while the inefficiency stays in place.

2Making Cost and Performance Visible

The first step is a view that connects money to code. We tag every database with its owning service and team, and break shared databases down by query family using statistics such as pg_stat_statements, attributing database time, and therefore an approximate share of the cost, to each service. A monthly report shows each team the cost of its databases, the trend, and the ten query families that use the most database time.

Monthly database report (example)
ServiceMonthly costChangeTop query family
orders$41,000+9%order history without index: 31% of DB time
catalog$18,500+2%search with LIKE: 44% of DB time
reporting$27,000+22%monthly revenue over full table
identity$6,2000%login lookup, healthy
Cost, trend and the query behind it, routed to the owning team.

Visibility alone changes behaviour. When a team sees that one query family uses 31 percent of its database time and costs about a third of its bill, fixing it becomes an obvious priority, and it gets an owner rather than staying a shared problem.

3Funding Performance Engineering Skills

Teams upsize partly because they lack the skills to do anything else. Reading an execution plan, designing an index for a query, choosing between OFFSET and keyset paging or spotting an N+1 pattern are learnable, but they need time and examples. So the organisation funds them: a small database performance group that works alongside teams rather than as a gate, workshops built on the company's own slow queries, and a few weeks a year in each team's roadmap for performance work with a measured target.

The first fixes usually pay for this many times over. A missing composite index or a rewritten report query often removes 20 to 50 percent of a database's load, which may allow a downsize that saves more than the engineer's time cost.

4A Review Gate for Large Instance Changes

We do not forbid upsizing, because sometimes the business really grew and the database needs more capacity. But a change above a threshold, for example any move that adds more than a set monthly cost, needs a short note: what the load is, which queries dominate, what was tried, and why the change is the right answer. A reviewer from the performance group answers within a day or two. Emergencies go ahead immediately and get the review afterwards, with a follow-up task to fix the cause.

Step throughRequesting a larger database instance
  1. Incident in progress?
    YesUpsize now, review within a weekNoWrite the short analysis note
  2. Top queries analysed and fixable?
    YesFix first, then reassessNoReview the capacity case
  3. Growth matches business volume?
    YesApprove the upsizeNoLook for workload to move off

3 steps in order. Play them, or step through them one at a time.

The gate asks for evidence, not permission to work.

5Using the Right Store for Each Workload

A transactional database is built for many small reads and writes with strong consistency. When it also runs monthly revenue reports, full-text search over product descriptions and exports for data science, those workloads dominate its size and cost, and they compete with customer traffic. Moving them pays twice. Analytics go to a warehouse or analytical store fed by change data capture, where large scans are cheap; search goes to a search engine built for it; exports read from a replica or the warehouse. The transactional database can then shrink to what transactions need.

6Measuring Efficiency Over Time

Total cost will keep growing if the business grows, so total cost is the wrong target. The right measure is cost per business unit of work, such as database cost per thousand orders, per active customer or per API call. If orders grow 30 percent a year and database cost per order falls 20 percent, the bill grows about 4 percent, which is a very different story from 60 percent.

I would report that number per domain every quarter, alongside latency percentiles, so efficiency gains do not come at the expense of user experience. Over two or three years, the goal is that cost per unit falls steadily and that upsizing becomes a deliberate, analysed choice.

7Follow-up questions

How do you stop the review gate from becoming bureaucracy?

Keep the note short, set a response time of a day or two, let emergencies proceed immediately, and track how often the review leads to a cheaper fix. If the gate rarely changes the outcome, the threshold is too low.

What if a team has no time for performance work?

Then the cost report and the cost per unit metric make the trade-off visible to the people who set priorities. Performance work competes with features on the same roadmap, so it needs to be expressed in money and risk, which the report provides.

Are reserved instances or savings plans part of the answer?

Yes, as a financial optimisation once the workload is right-sized. Committing to a large instance before fixing its inefficiencies locks in the waste, so I would do them after the first round of fixes.

8Conclusion

In this answer, we saw that upsizing becomes the default because it is fast and its cost lands elsewhere. To change that, we make cost and performance visible per service and query family with owners, fund performance engineering skills, add a light review gate for large instance changes, move analytics and search off the transactional database, and track cost per business unit of work so that efficiency, not just the total bill, shows whether the approach has changed.

What to say in the interviewAbout 80 seconds aloud

Open with

The bill grows because upsizing is the easiest fix for a slow query and nobody owns the total. So first I would make it visible: tag every database with its owning service, attribute database time to query families with pg_stat_statements, and send each team a monthly report with its cost, its trend and the query families that use the most database time.

Then, if they want more

Second, I would fund the skills to fix causes, a small performance group that pairs with teams, workshops on our own slow queries, and some roadmap time per team with a measurable target, because one good index often removes a large share of a database's load.

Third, larger instance changes above a cost threshold need a short note showing the workload was analysed, reviewed within a day or two, with emergencies allowed immediately and reviewed afterwards. Fourth, I would move analytics, search and exports off the transactional database onto a warehouse fed by CDC and a search engine, so the transactional database can shrink.

Finally, I would track cost per business unit, for example database cost per thousand orders, because total cost will grow with the business; success is that cost per unit falls each quarter while latency stays good.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Your cloud database bill grows about 60 percent a year, and teams usually respond to...": https://scrivio-interview-library.netlify.app/databases/database-scaling/eb80d1e436/