© Grant Fritchey 2018
Grant FritcheySQL Server 2017 Query Performance Tuninghttps://doi.org/10.1007/978-1-4842-3888-2_13

13. Statistics, Data Distribution, and Cardinality

Grant Fritchey1 
(1)
Grafton, Massachusetts, USA
 

By now, you should have a good understanding of the importance of indexes. But, the index alone is not what the optimizer uses to determine how it’s going to access data. It also takes advantage of enforced referential constraint and other table structures. Finally, and possibly most important, the optimizer must have information about the data that defines an index or a column. That information is referred to as a statistic. Statistics define both the distribution of data and the uniqueness or selectivity of the data. Statistics ...

Get SQL Server 2017 Query Performance Tuning: Troubleshoot and Optimize Query Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.