Effect of "Do not recompute statistics" option
am 13.07.2007 09:20:40 von bjornsuneandersen
I'm looking into the automatic recompilation of stored procedures and
I have been reading up on the "Do not recompute statistics" option on
indexes.
Am I correct in concluding that disabling the "Do not recompute
statistics" option for an index, will ensure that no automatic
recompilations will occur as a result of updates to data in that
index?
Am I also correct in understanding that the "Update Statistics" will
still update statistics for the index even if the "Do not recompute
statistics" option is disabled?
Regards
Bj=F8rn
Re: Effect of "Do not recompute statistics" option
am 13.07.2007 10:32:33 von Erland Sommarskog
Bjørn (bjornsuneandersen@gmail.com) writes:
> I'm looking into the automatic recompilation of stored procedures and
> I have been reading up on the "Do not recompute statistics" option on
> indexes.
>
> Am I correct in concluding that disabling the "Do not recompute
> statistics" option for an index, will ensure that no automatic
> recompilations will occur as a result of updates to data in that
> index?
>
> Am I also correct in understanding that the "Update Statistics" will
> still update statistics for the index even if the "Do not recompute
> statistics" option is disabled?
That is how I would read it to. I would still prefer to use sp_autostats
turn autostats off/on.
What sort of table are you considering to turn off autostats for? It seems
to me that this mainly is useful with tables that are modest in size, but
which are updated frequently.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downlo ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books .mspx