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.

EasyTechnical
0 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
0 practiced
Define index selectivity and cardinality. As a data engineer, how do these concepts affect index choice for OLTP vs OLAP workloads? Give an example of a low-cardinality column and explain why an index on it might be ineffective.
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.
HardTechnical
0 practiced
For a PostGIS-enabled table storing geospatial points, write the SQL to create an index to support nearest-neighbor (KNN) queries and spatial joins. Include SRID considerations and the appropriate GiST / SP-GiST operator class and explain why it improves performance.
HardBehavioral
0 practiced
Behavioral: Tell me about a time you introduced a major index change that caused unexpected production impact (e.g., outage or regression). Use the STAR format: situation, task, actions you took to mitigate, and the results/lessons learned. Highlight technical and communication steps.

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.