Chris Howarth-536003 (3/27/2010)
DBCC UPDATEUSAGE - doesn't that only have to be run on SQL 2000 or upon upgrade from 2000 -> 2005?
I thought the issue had been corrected in 2005 onwards?
DBCC UPDATEUSAGE BOL quote:
"In SQL Server 2005, these values are always maintained correctly. Databases created on SQL Server 2005 should never experience incorrect counts, however, databases upgraded to SQL Server 2005 may contain invalid counts."
As I mentioned before, using sys.dm_db_partition_stats is the most reliable, future-proof method.
Actually, that's exactly correct, Chris. I've been stuck in a 2k world for much too long. Being in a bit of a hurry, all I saw was a reference to sysindexes and the word "inaccurate" and didn't realize folks were talking of 2k5+.
is pronounced ree-bar and is a Modenism for R
First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is not.
Just because you can do something in PowerShell, doesnt mean you should. Helpful Links:
How to post code problemsHow to post performance problemsForum FAQs