InterviewStack.io LogoInterviewStack.io

Indexing Strategy and Selection Questions

Covers index design principles and practical selection of indexes to accelerate queries while managing storage and write cost. Topics include index types such as B tree hash and bitmap indexes and full text and functional indexes; single column composite and covering indexes; clustered versus nonclustered index architectures and partial or filtered indexes. Candidates should reason about index selectivity and cardinality and how statistics and histograms influence optimizer choices. Also assess index maintenance overhead fragmentation and rebuild strategies and the trade off between faster reads and slower inserts updates and deletes. Practical skills include reading execution plans to identify missing or inefficient indexes proposing index consolidation or covering index designs testing and benchmarking index changes and understanding interactions between indexing partitioning and denormalization.

HardTechnical
43 practiced
As a senior data engineer, design an indexing governance policy for a large organization: include review process for adding indexes, metrics to require (usage, maintenance cost), CI checks, naming conventions, and an approval workflow. How would you enforce and measure compliance?
MediumTechnical
40 practiced
Design an approach to detect and remove redundant indexes automatically. Describe the heuristics you would use (overlapping prefixes, same included columns), queries to find duplicates, safe removal checks, monitoring after removal, and CI gates to prevent reintroduction.
MediumTechnical
45 practiced
You observe index-only scans are not occurring though a covering index exists. List reasons why index-only scans might not be used (visibility map, deleted tuples and VACUUM, versioning) and the actions to enable index-only scans in Postgres.
MediumTechnical
50 practiced
For a table with a computed column (e.g., lower(email) or hashed value), explain benefits of functional (expression) indexes. Provide sample SQL to create an index on lower(email) in Postgres and describe when such an index eliminates the need for expression evaluation at runtime.
MediumTechnical
42 practiced
Explain prefix and hash indexes for very long string keys (e.g., UUIDs or long URLs). When is it appropriate to index a hash of a column rather than the full column, and what are the potential pitfalls (collisions, inability to support range scans)?

Unlock Full Question Bank

Get access to hundreds of Indexing Strategy and Selection interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.