Rebuild Index

  • Agreed Nagraj

  • Ok, looked around and seems there's both definitions of internal and external fragmentation. I usually use them to mean fragmentation internal to SQL (and fixable within SQL) and fragmentation external to SQL (fixable outside SQL)

    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
  • Thank you very much all of you.. I really appreciate you guys for putting out such a great discussion. I have used the script by muthukumaran and studied the results. The results were convincing.

    Actually, I am referring to two different databases on the same instance here. Both of them are mission critical and at the same time, Application team has agreed for a weekly outage of two hours on both the databases. So, we can do the rebuild offline.

    Now, I have a small concern here... While executing the stored procedure on one of my databases on a test server.. I have noticed CPU usage was maxed out. usually, this box sits at 45-50% CPU usage.. Also when this SP was running, I had none other than me logged into this machine... any comments on its effect on my prod server...

  • muthukkumaran (12/2/2009)


    GilaMonster (12/2/2009)


    muthukkumaran (12/2/2009)


    Hi,

    Read & use the index de-fragmentation script added in my signature.

    Why does your script use deprecated objects (that will be removed in future versions) and global temp tables?

    Also, if you're using Try .. Catch, you shouldn't be using @@Error. There are updated functions in SQL 2005 for getting error details

    Gail,Thanks for the update & Suggestion.I ll edit and post Script ASAP.

    Now the article has been published.

    Muthukkumaran Kaliyamoorthy
    https://www.sqlserverblogforum.com/

  • Hi guys, I have a question for you:

    I am doing an index rebuild offline weekly.

    I have a Service that runs 24/7 and inserts articles in the db.

    Do I need to run a script that will stop this Service during the offline rebuild?

    Is there a queue that is generated with all the requests or because of the lock on those tables I will just have some errors?

  • Please post new questions in a new thread

    Thanks

    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

Viewing 6 posts - 16 through 20 (of 20 total)

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