• 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.

    Chris

    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+.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    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.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)