Microsoft SQL Server Reorganize and rebuild index


Example

avg_fragmentation_in_percent valueCorrective statement
>5% and < = 30%REORGANIZE
>30%REBUILD
ALTER INDEX IX_NonClustered ON tableName REORGANIZE;  


ALTER INDEX ALL ON Production.Product
 REBUILD WITH (FILLFACTOR = 80, SORT_IN_TEMPDB = ON,
          STATISTICS_NORECOMPUTE = ON);