Scrivio Interview library
LeadershipPrincipal6 min read · updated 12 November 2026

Over 20 years, index advice moved from DBAs hand-tuning a few big databases to developers adding indexes in migrations across hundreds of services, and now to managed databases with automatic index suggestions. What does this mean for how you staff and govern database performance today?

Index knowledge now has to live with the developers who write the queries, supported by training and review checklists rather than a central DBA queue. A small database platform team provides guardrails, query statistics, plan regression detection, migration linting and expert escalation, and treats automatic index suggestions as input to review, because they do not weigh write cost or business priority. Managed services do not remove schema and query responsibility, so we measure outcomes such as p99 latency and cost per service, and keep a few deep experts for incidents and major migrations.

Why this question is asked

Twenty years ago a performance problem went to a DBA, who looked at a handful of big databases and added the right index. Today there are hundreds of services, each with its own database and its own migrations, and the cloud provider offers to suggest indexes automatically. The old model cannot scale and the new tools cannot decide alone. Interviewers ask senior leaders this to see whether they can design an organisation, not just an index. In this answer, we will see why ownership moved to developers, what the platform team provides, how to use automatic advisors, what managed services change, and how to measure and staff for outcomes.

1Why Index Knowledge Must Sit With Developers

An index is only good or bad relative to the queries that use it, and today the queries are written by developers, often generated by an ORM, and change every sprint. A central DBA queue sees a query only after it is slow in production, without the context of why it exists or how it will change. By the time the ticket is answered, the code has moved on.

So the first-line knowledge has to be in the teams. Every developer who writes data access code should know how a B-tree serves equality, ranges and sorting, why column order matters, and how to read EXPLAIN. That comes from training, short internal guides with our own examples, and a code review checklist that asks, for every new query on a large table, which index serves it and what the plan looks like. This is cheaper and faster than any queue.

2What the Database Platform Team Provides

Decentralising knowledge does not mean leaving teams alone. A small platform team, perhaps four to six people for a few hundred services, builds guardrails that make good practice the default. Query statistics are collected for every database, pg_stat_statements or performance_schema, and shown per service. Plan regression detection compares the plans and latencies of the top queries before and after each release and flags regressions. Migration linting in CI catches common mistakes: an index built without CONCURRENTLY on a large table, a duplicate of an existing index, a missing index on a new foreign key, or a table rewrite during business hours. And there is an escalation path to experts for the hard cases.

Step throughHow database performance is governed
  1. Product teamswrite queries and migrations, own their indexes
  2. Review checklist and trainingevery new query names its index and plan
  3. CI migration lintingconcurrent builds, duplicates, foreign key indexes
  4. Platform observabilityquery statistics, plan regression alerts per service
  5. Advisors and managed service toolssuggestions fed into review
  6. Deep expertsincidents, major migrations, engine upgrades

6 layers, from the top down. Step through them one at a time.

3Using Automatic Index Advisors Well

Managed databases and tools now analyse workloads and suggest missing indexes, sometimes even creating them automatically. They are genuinely good at one thing: spotting a frequent query that scans when an index would let it seek. They are weak at the trade-offs. An advisor does not know that a table takes 20,000 writes per second, that a suggested index blocks HOT updates on a hot column, that the slow query is a nightly report nobody waits for, or that an existing index could simply be extended.

So we treat suggestions as input, not decisions. The platform pipes them into each team's backlog with the query, the expected gain and the table's write rate, and the team reviews them like any other index. Automatic creation stays off for write-heavy production databases, or is limited to databases where the team has explicitly accepted it.

4What Managed Services Change and What They Do Not

Managed services remove a lot of operational work: provisioning, patching, backups, failover and storage growth. That is why the classic DBA role has shrunk. But they do not design schemas or write queries. A missing index on a managed database is just as slow, and the cost appears in a new place: on the bill. Poor indexing shows up as a larger instance class, higher provisioned IOPS, or more read replicas, and it is easy for that cost to grow quietly across hundreds of services.

This changes the language of the conversation with leadership. Instead of 'the DBA says this query is bad', the platform can show that a service spends a certain amount per month on database capacity and that its top three queries use 70 percent of it.

5Measuring Outcomes and Staffing for Depth

We measure what matters to users and the business, not the number of indexes. For each service: p99 latency of its top queries, the share of database time used by the top ten queries, database cost per service or per thousand requests, and the number of incidents caused by query or schema problems. Teams see their own numbers on a dashboard, and the platform team reviews the outliers with them each quarter.

Finally, we still need a few deep experts, people who understand the planner, locking, replication and storage internals of our main engines. They are not a queue for routine index requests. They handle incidents, design major migrations and engine upgrades, train the teams, and write the linting rules that encode their knowledge so it scales.

Old and new models of database performance
ConcernCentral DBA eraToday
Who adds indexesDBA on requestproduct team, in migrations
How problems are founduser complaints, DBA reviewsstatistics, plan regression alerts
Role of automationlittleadvisors feed reviews
Where poor indexing shows upslow databaseslow service and higher cloud bill
Role of expertsdo the workbuild guardrails, handle hard cases

6Follow-up questions

How do you train hundreds of developers in indexing?

Short, practical material using our own slow queries as examples, a one-hour workshop on reading EXPLAIN, and the review checklist, which teaches through repetition. Champions in each area, developers with a bit more depth, answer first-line questions so experts are not overloaded.

Should the platform team have veto power over migrations?

For a small set of dangerous patterns, yes, enforced automatically by the linter, such as non-concurrent index builds on large tables. For design choices, no: teams own their schemas, and the platform advises and measures.

What if a team ignores the dashboards?

Link the numbers to things they care about: incidents in their area, their service's cost, and their latency objectives. A quarterly review of outliers with engineering managers usually changes priorities quickly.

7Conclusion

In this answer, we saw that the move from central DBAs to developer-owned migrations and managed advisors means index knowledge must sit with developers through training and review checklists, a small platform team must provide guardrails such as query statistics, plan regression detection, migration linting and escalation, automatic advisors are input to review because they ignore write cost and priorities, and managed services shift the cost of poor indexing onto the bill. We measure outcomes like p99 latency and cost per service and keep a few deep experts for incidents and major migrations.

What to say in the interviewAbout 90 seconds aloud

Open with

The main consequence is that index knowledge has to sit with the developers, because they write the queries and those change every sprint. A central DBA queue only sees a query after it is slow in production.

Then, if they want more

So I would invest in training, short guides with our own examples, and a code review checklist that asks which index serves a new query and what the plan looks like.

Then I would have a small database platform team that provides guardrails rather than doing the work: query statistics per service from pg_stat_statements or performance_schema, plan regression detection around releases, migration linting in CI for things like non-concurrent index builds or duplicate indexes, and an escalation path.

Automatic index advisors are useful, but they do not weigh write cost, HOT updates or business priority, so their suggestions go into the team's review instead of being applied blindly. Managed services removed operational work like backups and patching, but not schema and query design, and poor indexing now shows up as bigger instances and IOPS on the bill.

So I would measure outcomes: p99 latency of top queries, database cost per service, and incidents caused by queries. And I would keep a few deep experts for incidents, major migrations and upgrades, whose knowledge we turn into lint rules so it scales.

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 "Over 20 years, index advice moved from DBAs hand-tuning a few big databases to...": https://scrivio-interview-library.netlify.app/databases/indexing/8b15de1210/