Updating Statistics – 2005 | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Updating Statistics – 2005

Hi All, I have few quries. 1) Do we need downtime or to make database offline while updating statistics for table? Or this can be done online? 2) If this can be done online, will it consume CPU or memory? 3) Will the log file will grow during statistics updation? I will appreciate if somebdy can also provide me with some script to update statistics.
Thanks in Advance

1) Can be done online but better in non working hours.
2) CPU and disk.
3) What recovery model do you have? Check: UPDATE STATISTICS in books on line. Also review script forum to find more information. Luis Martin
SQL-Server-Performance.com All in Love is Fair
Stevie Wonder
All postings are provided “AS IS” with no warranties for accuracy.
I have not seen any log file growth while updating statistics… http://www.microsoft.com/technet/prodtechnol/sql/2005/qrystats.mspx#ERC
Mohammed U.
We have autoupdatestatistics ON for all our databases !
And there are some with heavy load. Investigate if autoupdatestatistics hurts your applications.
We also run sp_updatestats at least 3 times a year (or during out plant’s mintenance downtime every x weeks ) because depending on the type of applicationusage, stats still seem to get behind.
Refer tohttp://www.microsoft.com/technet/prodtechnol/sql/2005/qrystats.mspx#EHKAE for all kinds of practices you need to follow in this regard. Satya SKJ
Microsoft SQL Server MVP
Contributing Editor & Forums Moderator
This posting is provided AS IS with no rights for the sake of knowledge sharing.