The sp_updatestats procedure has the same effect as running the UPDATE STATISTICS command using the ALL keyword.The exception is that the sp_updatestats procedure checks the internal system tables and looks to see if the table needs its statistics updated. In addition to updating the statistics on user tables, the procedure also checks system tables for stale statistics and the statistics are updated as needed.
Even worse, it would perform a table scan instead of any index operation at all.
Auto create statistics and auto update statistics Each database has two options related to statistics: auto create statistics and auto update statistics.
The prefered method for updating SQL Server statistics is the UPDATE STATISTICS command.
This command allows much greater flexibility when programming, however it does require more initial programming.
However, approximately 1.2 million records were deleted each morning and throughout the day a new 1.2 million records were added.
The primary key for this table was an identity column with a data type of INT.
The massive number of queries would send SQL Server's CPU to 100% utilization.
We decided to start updating the statistics using the FULLSCAN flag.
The other indexed column also had a data type of INT.