Search code examples
sql-serverindexingdefragmentation

Defrag indexes on very large production tables


I want to defrag indexes on a very large production table. This table is used by clients and the downtime will create a problem. What is th ebest methid to defrag indexes on such SQL server tables. If I rebuild indexes it will lock table. Should I reorganize indexes. If I stop the process, will it be rolled back? or Will it continue from the stage where it was stopped?


Solution

  • Index defrag can run online without locking the table, and "can be resumed".

    In enterpise edition of SQL server you can also rebuild index online (which is better than index defrag for performance)