December 6, 2009 at 11:57 pm
Hi,
What is the main difference between sp_updatestats and DBCC UPDATEUSAGE?
Which one to use when?
Thanks in Advance.
December 7, 2009 at 12:41 am
They are completely unrelated and do totally different things.
sp_updatestats runs a statistics update (using UPDATE STATISTICS) across all the statistics in the database where the underlying table has had at least one row changed since the last statistics update.
DBCC UPDATEUSAGE fixes incorrect page-usage metadata in the storage engine. It was needed on SQL 2000 because there were bugs in the algorithms that were supposed to keep the page usage metadata correct. It should not be needed any longer on SQL 2005, as those bugs were supposedly fixed during the development of SQL 2005, though at least one persisted until SP3.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 7, 2009 at 1:48 am
Thanks Gila!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply