Question : difference between RE-INDEXING   and INDEX-DeFragging

Hi,

Can some one tell me the difference between DBCC - INDEXDEFRAG and DBCC - REINDEX

Answer : difference between RE-INDEXING   and INDEX-DeFragging

from http://support.microsoft.com/kb/260418/en-us

1. Q: What is the difference between DBCC INDEXDEFRAG and DBCC DBREINDEX?

A: Unlike DBCC DBREINDEX or any general index build, DBCC INDEXDEFRAG is an online operation, so it does not hold long-term locks that can block running queries or updates. Depending on the amount of fragmentation, DBCC INDEXDEFRAG can be considerably faster than running DBCC DBREINDEX due to the fact that a relatively unfragmented index can be defragmented much faster than a new index can be built. Also, another advantage is that with DBCC INDEXDEFRAG the index is always available, unlike DBREINDEX. Note however, that a large amount of fragmentation can cause DBCC INDEXDEFRAG to run considerably longer than DBCC DBREINDEX, which may or may not outweigh the benefit of the command's online capabilities. Also, DBCC INDEXDEFRAG will not help if two indexes are interleaved on the disk because INDEXDEFRAG shuffles the pages in place. To improve the clustering of pages, rebuild the index.
Random Solutions  
 
programming4us programming4us