on 2011 Jul 26 4:22 AM
In relation to this question: How can I help the optimizer estimating better?
No histogram is returned by the tools for varchar columns. Instead one shall use the Estimate function to check for the selectivity the optimizer is anticipating for a certain value.
Therefore I am wondering if Create Statistics or Drop Statistics will have any effect for varchar columns?
Request clarification before answering.
CREATE
and DROP STATISTICS
work for string values as well as numeric values. For strings, the histogram "buckets" are really frequent-value statistics, since with strings of arbitrary length there isn't a useful "width" to use as the bucket size, as there are for ordered, numeric domains such as integers.
The reason that a histogram is not returned is that the frequent-value statistics are hashed, and their internal representation isn't convertible into a useful form that would make sense to an application developer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
30 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.