Database updating statistics

In this situation, the statistics can get stale or be inaccurate. This should be an exceptional event in most systems.

The topic of statistics and their maintenance is not straightforward.Sp_updatestats will look at all the statistics within a database to see if any rows have been modified in the table that the statistics support.If one or more rows have been modified, then you’ll get a sampled update of the statistics.If you absolutely must update the statistics and rebuild the indexes and you’re not going to try to tightly control exactly which indexes and tables you do this on, then the best practice would be to update the statistics first and then rebuild the indexes second. The keyword and tricky phrase that you have to look at is WITH FULL SCAN.That indicates that the full data set is used to create/update the statistics.

Leave a Reply