Overview
Syllabus
Intro
Technical Assistance
PASS SUMMIT 2015
The best way to learn about indexes
Get your pen and paper ready!
When creating a Non-Clustered Index, the size of any included columns counts towards the 900 byte size limit
Non-Clustered Index B+ Tree
Can SQL Server use this index for this query? CREATE INDEX ix_creationbute on dbo. Posts CreationDate
Looking at the index...
SQL Server can read backwards!
Look at the query
Functions aren't great
8,745 logical reads (each)
How you write the query matters
The Query Optimizer knows how fragmented each index is.
The optimizer does NOT consider...
But the optimizer DOES consider...
How many rows with NULL values can be in an index defined as unique?
Time to get controversial
Filtered indexes are interesting for this!
Which of the following filtered index definitions is valid?
This one's tricky!
Filtered indexes are very cool
When creating an Indexed View, which of the following tasks is required, no matter what? A. Make sure all the underlying tables have Clustered
If you answered, "rewrite your queries to force them to use the view"...
No matter what, you must always...
Indexed views are magical
Join me for SQL Server Index Therapy
Like What You've Heard?
Taught by
PASS Data Community Summit