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

For recurring analytics that compute ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY event_ts DESC) on a 2B row events table, propose index and partitioning strategies across OLAP systems to speed queries, and discuss trade-offs such as insert throughput vs query latency and maintenance costs.

HardTechnical
41 practiced

For columnar analytical databases (e.g., Redshift, BigQuery, Snowflake), indexing concepts differ from row stores. Explain how sortkeys, clustering, and partitioning map to traditional index concepts and describe a migration plan from a row-store with many indexes to a columnar store while preserving dashboard performance.

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.

HardTechnical
39 practiced

Discuss when you would use a clustered columnstore index versus a nonclustered columnstore index in SQL Server for a large analytical fact table that receives frequent micro-batch loads. Explain how the delta store and tuple-mover affect query and load performance, and how you would structure data loads to minimize fragmentation.

MediumTechnical
41 practiced

Compare bitmap indexes and B-tree indexes for high-cardinality columns in a data warehouse. Explain storage footprints, query execution patterns (bitwise operations vs B-tree seeks), and update/maintenance characteristics.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.