Indexing Strategy and Design Questions

Choosing and designing indexes: B-tree, hash, composite, covering, partial, and full-text/inverted indexes, and the trade-offs between read acceleration and write/storage overhead. Covers selecting index columns from query patterns, cardinality and selectivity reasoning, diagnosing why an index is or is not used, and index maintenance: rebuilding or reorganizing a fragmented index, finding and dropping redundant or unused indexes, and rolling out a new index to production safely. Also covers indexing in analytical (bitmap, columnar), partitioned, and distributed/NoSQL systems. Central to database performance interviews.

HardTechnical
41 practiced

Discuss how secondary indexes are implemented in distributed NewSQL systems like CockroachDB or Spanner. Explain transaction implications, read/write amplification, how index-maintenance is coordinated across nodes, and the effect on latency for multi-region writes.

HardSystem Design
39 practiced

Design a plan to add a large index to a production table with zero downtime. How do you avoid locking the table for the duration of the build, verify the new index is correct before relying on it, and confirm no query regressions occurred?

EasyTechnical
35 practiced

A nightly ETL loads 200M rows into a reporting table. Describe the differences between index REBUILD and REORGANIZE (or VACUUM in PostgreSQL) and recommend when you would schedule each for a large reporting DB to minimize report downtime.

MediumTechnical
34 practiced

A dashboard (or application) has degraded after an index was added to a frequently-updated table. Outline a diagnostic checklist, metrics, logs, queries you'd check, to determine whether the new index is the cause, and how you'd measure the impact before deciding to roll it back or adjust it.

HardTechnical
45 practiced

Explain how to quantify index fragmentation in SQL Server and PostgreSQL. Describe the thresholds and criteria you would use to decide between reorganize vs rebuild (or REINDEX CONCURRENTLY), and how to schedule such operations with minimal impact on throughput.

Unlock Full Question Bank

Get access to all 9 Indexing Strategy and Design interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.