SQL Server 2008 – Reindexing and Rebuilding

sql serversql-server-2008

Should I reindex/rebuild while my DB is up and running or should I take it offline? Also after doing some digging around I came across this article that recommends Rebuilding after 40% fragmentation and Reindexing between 10% to 40%. Can anyone verify this? My DB is a quite large and is slowing down more and more.

Best Answer

Should I reindex/rebuild while my DB is up and running or should I take it offline?

You cannot rebuild index when database is offline, the database has to be online to rebuild the index.

The widely accepted parameter for rebuilding is if fragmentation >30 % rebuild it and if fragmentation lies between 10 and 30 % reorganize it. You can use your own script, maintenance plan or Ola Hallengren script or My script. If you have time I would suggest you to create your own.