INDEXDEFRAG

  • I have a job to DBCC DBREINDEX every table. I was doing some reading on DBCC INDEXDEFRAG and was wondering what is the big difference between them.

    BOL gives the definition differences in regards to times and locks but I haven't a clear answer should both DBCC operations be run for best performance?

    Is it good practice to run DBCC DBREINDEX to fix the fill on the pages and then run DBCC INDEXDEFRAG to clean up the file, or does DBCC DBREINDEX do it all?

    -Hutch

  • Simply put

    DBREINDEX rebuilds the indexes by creating a new copy of the objects and moving them into order.

    INDEXDEFRAG does just like the Windows defrag utility. It reorders the data.

  • DBREINDEX is more effective, but also cost more in performance. I would run INDEXDEFRAG for all index, and where the index is still fragmented, run DBREINDEX.

Viewing 3 posts - 1 through 3 (of 3 total)

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