~/talk

Take the SQL Server Index Quiz!

Talkat 24 Hours of PASS: Summit Preview 2015 · on Thursday, 2015-09-17· [databases]
slides:none on file

Six quick, concrete takeaways: a nonclustered index’s key columns are subject to the 900 byte limit but included columns are not; applying a function to a key forces a scan (example on SQL Server 2014 using the Stack Overflow sample shows 8,700 logical reads versus 3 reads after rewrite); the optimizer does not consider physical fragmentation; a unique index allows one NULL; filtered indexes forbid OR and functions but allow NOT =; indexed views require a unique clustered index.

AI-written summary · about

  1. 0:00Intro
  2. 0:55Technical Assistance
  3. 2:04PASS SUMMIT 2015
  4. 4:10The best way to learn about indexes
  5. 5:35Get your pen and paper ready!
  6. 6:46When creating a Non-Clustered Index, the size of any included columns counts towards the 900 byte size limit
  7. 7:34Non-Clustered Index B+ Tree
  8. 11:12Can SQL Server use this index for this query? CREATE INDEX ix_creationbute on dbo. Posts CreationDate
  9. 12:59Looking at the index...
  10. 13:16SQL Server can read backwards!
  11. 14:17Look at the query
  12. 14:48Functions aren't great
  13. 16:338,745 logical reads (each)
  14. 18:53How you write the query matters
  15. 19:41The Query Optimizer knows how fragmented each index is.
  16. 20:19The optimizer does NOT consider...
  17. 23:08But the optimizer DOES consider...
  18. 24:35How many rows with NULL values can be in an index defined as unique?
  19. 25:33Time to get controversial
  20. 26:48Filtered indexes are interesting for this!
  21. 28:20Which of the following filtered index definitions is valid?
  22. 29:49This one's tricky!
  23. 32:26Filtered indexes are very cool
  24. 32:42When creating an Indexed View, which of the following tasks is required, no matter what? A. Make sure all the underlying tables have Clustered
  25. 33:46If you answered, "rewrite your queries to force them to use the view"...
  26. 34:36No matter what, you must always...
  27. 36:23Indexed views are magical
  28. 37:07Join me for SQL Server Index Therapy
  29. 56:43Like What You've Heard?
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.