How Index Keys and Includes Work (1 hour)

Build your powers of index design by learning how indexes are structured in SQL Server.

Try the course quiz anytime.

Understanding how indexes work will help you create effective indexes for your queries with less guess-work. This course teaches you:

  • Why can you seek on key columns?
  • Where are included columns written, and how can you use them?

In this demo-based course, we’ll use undocumented commands in SQL Server to explore the secrets of a disk-based rowstore index.

Course scripts are located at https://github.com/LitKnd/SQLWorkbooks/tree/main/how_index_keys_and_includes_work

Each video offers captions in English, and a written transcript is in each lesson.

Lessons

Get ready to dive into indexing (3 minutes)

Create a test index and discover its structure (8 minutes)

Update an important key value (9 minutes)

Index structure, illustrated (3 minutes)

Trace buffer latches on seeks and scans (16 minutes)

Seeks and scans, illustrated (4 minutes)

Quiz: How index keys and included columns work

Three question video quiz