dbcc for index

  • Dear Friends,

    Wanted some idea about index tunning.....my question is like

    whats the difference between dbcc indexdefrag and dbcc dbreindex ?

    whats the benifits of both?

    and most important how to determine which to use when?

    Expecting some fruitful answers from all my teachers....

    Thanks

    Mithun

  • On a 2005 server you shouldn't be using either. They're both deprecated.

    Look up ALTER INDEX in books online, specifically the sections REBUILD (the replacement for DBCC DBREINDEX) and REORGANISE (the replacement for DBCC INDEXDEFRAG)

    They both remove fragmentation from indexes, but they do it in different ways.

    Also have a look at the page "Reorganizing and Rebuilding Indexes" in Books Online. It goes into a lot of detail on the differences between the two.

    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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • thanks for ur reply,

    But when to use which?

    can u guide me in that?

    pls..

    Mithun

  • Did you look at the Books Online pages that I suggested? The page "Reorganizing and Rebuilding Indexes" has a couple paragraphs exactly that, which to use when.

    Here's the online link if you're having trouble finding that page in Books Online.

    http://technet.microsoft.com/en-us/library/ms189858(SQL.90).aspx

    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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks Again,,

    Its really helpfulll....

    Mithun

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply