Your understanding is correct as to how pre-14.0 statistics collection on multiple columns work.
There are two enhancements in 14.0 that will apply here:
1. The default value length stored in the statistics histogram has been increased to 25 bytes.
2. You can expand the default value length that will be carried in the histogram for any given statistics by means of the new USING MAXVALUELENGTH. You can go pretty high on this specification if you need to, but the tradeoff is that it may increase the size of the total histogram. One nice thing about how this options works is that the value length field in the histogram will not pad unused bytes, so if a given value is smaller than the MAXVALUELENGTH specifies, the histogram will only hold characters up to the actual length of each particular value.
Joe,
Your understanding is correct as to how pre-14.0 statistics collection on multiple columns work.
There are two enhancements in 14.0 that will apply here:
1. The default value length stored in the statistics histogram has been increased to 25 bytes.
2. You can expand the default value length that will be carried in the histogram for any given statistics by means of the new USING MAXVALUELENGTH. You can go pretty high on this specification if you need to, but the tradeoff is that it may increase the size of the total histogram. One nice thing about how this options works is that the value length field in the histogram will not pad unused bytes, so if a given value is smaller than the MAXVALUELENGTH specifies, the histogram will only hold characters up to the actual length of each particular value.
Thanks, -Carrie