Sunday, July 28, 2013

STATISTICS_NORECOMPUTE in Rebuild Index


It specifies whether distribution statistics are recomputed. The default is OFF.
ON
Out-of-date statistics are not automatically recomputed.
OFF
Automatic statistics updating are enabled.

Indeed, statistics are recomputed during the index rebuild.

Dont think that it stops SQL Server from updating the statistics at the time of a rebuild; that is NOT what it does. 
Statistics are ALWAYS updated at the time of a REBUILD; this cannot be turned off (nor would you want to).

Instead, STATISTICS_NORECOMPUTE stops the database-wide auto-updating from updating the specific statistics for an index (or column-level statistic) that was created (or rebuilt) with this option turned on.

STATISTICS_NORECOMPUTE – When would anyone want to use it?


HTH

No comments: