Senator Guerra Souty original series calendar,replica hublot blue steel peach pointer collocation of rolex replica Rome digital scale, track type minute replica watches scale shows that the classical model is swiss replica watches incomparable, wearing elegant dress highlights.
mr-ponna.com

 

YOU ARE HERE: HOME Questions What is difference between rebuild and reorganize the indexes in SQL Server 2005 When should i go



Difference between Index Rebuild and Index Reorganize Explained

View(s): 16547

What is difference between rebuild and reorganize the indexes in SQL Server 2005? When should i go for rebuild the index and when should i go for reorganize the index?

Answer 1)
Index Rebuild: This process drops the existing Index and Recreates the index.
USE AdventureWorks;
GO
ALTER INDEX ALL ON Production.Product REBUILD
GO

Index Reorganize: This process physically reorganizes the leaf nodes of the index.
USE AdventureWorks;
GO
ALTER INDEX ALL ON Production.Product REORGANIZE
GO

You need to check the fragmentation (using DBCC showcontig) for indices to decide what to go for rebuild or reorganize.

Recommendation: Index should be rebuild when index fragmentation is great than 40%. Index should be reorganized when index fragmentation is between 10% to 40%. Index rebuilding process uses more CPU and it locks the database resources. 
  Asked in:  TCS (Tata Consultancy Services)   Expertise Level:  Experienced
  Last updated on Thursday, 03 November 2011
4/5 stars (15 vote(s))

Register Login Ask Us Write to Us Help