
 Rank: Guest Groups: Guest
Joined: 9/17/2007 Posts: 11,670 Points: -1,200
|
Date parsed: 18/10/2007 16:51:14 Date: Thu, 18 Oct 2007 16:51:14 -0000
We recently discovered a performance problem that was being caused by the query optimizer using the auto created statistics on a column instead of the statistics that we manually maintain. There is an index on the column with the statistics set to norecompute and we manually update the statistics because we want a 100% sample rate. With the 100% sample rate the index is very selective. However there is also auto created statistics on the same column with a very small sample rate and its selectivity is very low. For some reason the query optimizer was looking at the auto created statistics.
According to books online, "when the AUTO_CREATE_STATISTICS database option is set to ON (default), the Database Engine automatically creates statistics for columns without indexes that are used in a predicate." If that is correct then there should not be auto created statistics on columns that have an index, right?
|