CHAPTER 12

image

Statistics, Data Distribution, and Cardinality

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. 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 are maintained both on indexes and on columns within the system. You can even define statistics manually yourself.

In this chapter, you’ll learn the importance of statistics in query ...

Get SQL Server Query Performance Tuning,Fourth Edition 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.