1

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?

Joel Beckham
  • 18,254
  • 3
  • 35
  • 58
Prateek
  • 231
  • 3
  • 6
  • 12

1 Answers1

2

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)

niktrs
  • 9,858
  • 1
  • 30
  • 30
  • @niktrs- We don't have Enterprise edition. so rebuilding indexes online is not an option for us – Prateek Jun 22 '11 at 20:53
  • @niktrs- so if I reorganize indexes and stop the operation in between then it "can be resumed" – Prateek Jun 22 '11 at 20:54
  • Yes. That means that if i stop the process and restart it, indexes not fragmented won't need reindex – niktrs Jun 22 '11 at 21:03