Sql-server – Rebuild or Reorganize index

sql-server-2008-r2

I am using SQL server 2008 R2.

The DB is normally used from 9 am to 9 pm and the maximum db size is 10 GB.

Whether rebuild index offline causes any problem, if it is done during midnight (when no one is using db)?
or reorganize is enough for index maintenance?

Best Answer

First question - are you using SSD or hard disks. If you are using SSD you probably don't need to do index maintenance at all (maybe once or twice a year) as doing a random read has no cost disadvantage over doing a sequential read.

That said if your database is not in use a rebuild ought to be perfectly fine, be aware that the transaction log should be sized to be equal in size to the largest table as the rebuild will be done in a single transaction.