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
0 practiced
Describe advanced remedies when optimizer chooses a nested-loop plan due to histogram skew on a highly-skewed column: options include increasing histogram resolution, creating filtered statistics, using extended statistics (multi-column), rewriting predicates, or enforcing join hints. Discuss trade-offs and long-term maintenance implications.
MediumTechnical
0 practiced
Two candidate composite indexes exist: (a,b,c) and (b,a,c). Given a query workload with predicates frequently on a and sometimes on both a and b, explain which ordering you would choose and why. Discuss how prefix usage and selectivity drive the order.
MediumTechnical
0 practiced
Compare full-text indexes with traditional B-tree indexes for BI search features such as product description search. Cover differences in query capabilities (tokenization, ranking), storage, and recommended scenarios for use in dashboards and ad-hoc exploration.
HardTechnical
0 practiced
Explain why index-only (covering) scans may fail on partitioned tables with local indexes and propose remedies. Discuss when global indexes are appropriate and the maintenance costs they introduce.
EasyTechnical
0 practiced
You have a sales_fact table: (sale_id PK, order_id, product_id, order_date timestamp, amount numeric). Many dashboard queries filter by order_date BETWEEN X AND Y. Write the SQL statement (PostgreSQL) to create a single-column index that speeds date-range filters, and explain any options you would set for a very large table.

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.