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.

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.

    Reply
    • 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!

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.