But sometimes, performance can go badly wrong if SQL Server has an imperfect index for an query.
In this session, I show you a query whose performance regresses after you add a nonclustered index. Your challenge is to figure out why the query got slower.
Try your hand at speeding up the query by tuning the TSQL. Afterward, I explore the query execution plan with you and walk you through multiple potential solutions, showing the pros and cons of each one.
Course scripts and sample execution plans are here: https://github.com/LitKnd/SQLWorkbooks/tree/main/why_creating_an_index_can_slow_down_a_query
This course features closed captions in English for each video, plus a written transcript in each lesson.