Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 DBCC UpdateUsage

Author  Topic 

Zoroaster
Aged Yak Warrior

702 Posts

Posted - 2007-09-04 : 13:50:48
Back in the days when I did application support we often used DBCC updateusage against customers databases when things were running slow. It seemed to work although from what I know of it now I am not sure why. Do any of you have experience using this as part of a maintenance plan or to address performance issues?

------------------------
Future guru in the making.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-09-04 : 13:53:46
DBCC UPDATEUSAGE does nothing for performance. It only correct inaccuracies in the system tables. So for example if you ran sp_spaceused and the inaccuracies were preset, you would receive incorrect information back. DBCC UPATEUSAGE corrects that.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-09-04 : 13:54:48
maybe you ran update stats?
that would be a different story...

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

Zoroaster
Aged Yak Warrior

702 Posts

Posted - 2007-09-04 : 13:55:44
quote:
Originally posted by tkizer

DBCC UPDATEUSAGE does nothing for performance. It only correct inaccuracies in the system tables. So for example if you ran sp_spaceused and the inaccuracies were preset, you would receive incorrect information back. DBCC UPATEUSAGE corrects that.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/



That is consistent with everything I have read about it, but for some reason it was passed around as a last resort fix for issues. There was always rumor that it did more than was documented, but sounds like it was nothing more than a rumor after all.

Thanks,
-Rick


------------------------
Future guru in the making.
Go to Top of Page

Zoroaster
Aged Yak Warrior

702 Posts

Posted - 2007-09-04 : 14:05:14
I did some more digging and found the following:

'Next, run this command: DBCC UPDATEUSAGE ('databasename'), where databasename is the name of the database. The official use for this command is to report and correct inaccuracies in the sysindexes table, which may result in incorrect space usage reports. Apparently, it can also fix the problem of unreclaimed data pages.'

This is from an article at http://www.sql-server-performance.com/articles/dba/lost_data_sql_server_p1.aspx

I think perhaps this was the logic behind running it?


------------------------
Future guru in the making.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-09-04 : 14:13:07
Well if that's the case, then you'll only see a performance boost if this condition exists. Are you doing massive deletes so that you would have lots of unreclaimed data pages?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

Zoroaster
Aged Yak Warrior

702 Posts

Posted - 2007-09-04 : 14:48:30
That would have definitely been a true scenario, I am not with that company any more but the application we supported was constantly doing deletes based on purge cycles that were set by the end users.



Future guru in the making.
Go to Top of Page
   

- Advertisement -