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.

HardSystem Design
37 practiced

Design full-text search indexing for an international product catalog: requirements include fuzzy matching, multilingual support (English, Japanese), ranking by relevance and popularity, and low-latency autocomplete. What index choices and trade-offs would you consider, and when would you offload to an external search engine instead?

EasyTechnical
58 practiced

As a data engineer you observe that bulk inserts to table logs slowed significantly after adding several indexes. Describe immediate steps you would take to diagnose and mitigate insert slowdown without losing required indexes permanently.

EasyTechnical
61 practiced

Describe full-text indexes and when you'd reach for one instead of LIKE '%term%'. Use an example: a product_descriptions table where users search for product features, in multiple languages.

MediumTechnical
34 practiced

For a table with a computed value used in filters or joins (for example lower(email), or a hashed value), explain the benefit of a functional (expression) index. Provide sample SQL to create one, and discuss when you'd prefer it over normalizing the data into its own lowercased/hashed column.

MediumTechnical
45 practiced

Explain how database statistics and histograms influence the optimizer's choice of index or join order. How would you diagnose and fix a query that does a full table scan due to stale or absent statistics?

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.