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.

MediumTechnical
0 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)?
HardTechnical
0 practiced
Discuss automated index advisors/tuners (e.g., AWS RDS Performance Insights suggestions, SQL Server Database Engine Tuning Advisor). What are benefits and risks of applying their recommendations automatically? Describe a safe CI/CD workflow to vet and roll out suggested indexes.
HardTechnical
0 practiced
Design an indexing strategy for time-series telemetry ingest at 100k writes/sec and queries that request last N minutes per device. Compare approaches using TimescaleDB hypertables, partitioning + local indexes, ClickHouse, and inverted time-partitioned indexes. Address retention and compaction.
MediumTechnical
0 practiced
You have a JSONB column profile in users storing nested fields. Example query: `SELECT id FROM users WHERE profile->'address'->>'city' = 'Seattle'`. Write two different Postgres index strategies (functional b-tree and GIN) to accelerate this query and explain pros/cons of each.
HardSystem Design
0 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. Discuss index choices, analyzers, n-grams, trigram indexes, and when to offload to external search engines.

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.