Database · SQL Server
How would you handle a practical scenario involving Indexing in SQL Server?
For a practical scenario involving Indexing, I would first clarify the business goal, scale, constraints, and the failure or quality attribute being tested. Indexes are data structures that help SQL Server locate rows efficiently without scanning the entire table. The scenario centers on given a slow query filtering by customer and date, explain how you would inspect the execution plan and decide whether a composite covering index is appropriate. I would then compare the main alternatives and tradeoffs, identify likely failure modes, and explain how I would validate the solution through testing, observability, security controls, and recovery or rollback planning.