04. Multi-Column Statistics and the Cardinality Estimators (14m)
In the real world, your indexes often cover multiple columns. We’ll see how the density vector has multiple rows now, and see how the pre-2014 and 2014+ cardinality estimator have huge differences.
- 01. A Tale of Two Plans (7m)
- 02. Getting to Know Statistics (15m)
- 03. Combining Multiple Single-Column Statistics (8m)
- 05. What Is the Cardinality Estimator? (5m)
- 06. Filtered Statistics: ENHANCE! (15m)
- 07. The Ascending Key Problem (11m)
- 08. 10 Rules for Managing Statistics (12m)
- 09. Seeks, Scans, and Sargability (9m)
- 10. How Execution Plans are Made (10m)
2 Comments. Leave new
Great show! The slight difference of estimated rows based on two indexes with different order of columns is because of the EQ_ROWs, which are exact accurate numbers that were tallied during index creation. It is more like the stats was created with full scan option. Whereas the number in the system created stats are approximate because they are based on sampled rows. So theoretically, the estimated number should be the same regardless the order of columns in the index because the formula is the same. It is best to make it clear in the video if I am correct.
I think you’re saying, “It doesn’t matter what order the columns go in the statistics, the estimate will be the same.” That’s not correct – it does definitely matter, especially for things like range searches. We cover that in more details in the Fundamentals of Index Tuning class.
Or if I didn’t understand the question right, can you rephrase it as a question? Thanks!