Difference Rebuilding Indexes and Re-indexing?

  • Hello all,

    Is there a difference between Rebuilding Indexes and Re-indexing? I am posting this question in a dilemma. Here is the Scenario.

    I have tried to re-index the tables having an xml column and that wouldn't work when the database is online. The rebuild option works for rebuilding the indexes(on XML columns) even when the database is online. I checked the web and found no difference between the two. Can someone shed more light on this issue and let me know the difference if any? If the two are different what is the best option to over come fragmentation?

    Thanks

    Chitanya Chitturi :-)
  • When you say 'rebuilding and reindexing', what commands are you specifically referring to.

    In general, rebuild means ALTER INDEX ... REBUILD, but reindexing can mean just about anything.

    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
  • To add to what Gail posted - the term ONLINE for index rebuild has nothing to do with whether or not the database is online. It means that the index being rebuilt will be available during the rebuild operation. Once the rebuild is done, the old index is removed and the newly built index is put in its place.

    You cannot rebuild an XML index - or any index that contain LOB data ONLINE. You have to build it without that parameter and that means the index will not be available while the index is being rebuilt.

    Jeffrey Williams
    Problems are opportunities brilliantly disguised as insurmountable obstacles.

    How to post questions to get better answers faster
    Managing Transaction Logs

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

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