Thursday, January 26, 2012

SQL SERVER – Difference Between Rebuild Index and Reorganize Index with T-SQL Script

Index Rebuild : This process drops the existing Index and Recreates the index.

USE TESTDB; 
GO 
ALTER INDEX ALL ON Production.Product REBUILD 
GO 

Index Reorganize : This process physically reorganizes the leaf nodes of the index. 

USE TESTDB; 
GO
ALTER INDEX ALL ON Production.Product REORGANIZE 
GO

0 comments:

Post a Comment