Groups | Blog | Home
all groups > sql server programming > september 2003 >

sql server programming : Index defragmentation


joe
9/13/2003 9:43:07 PM
Are there any other ways to defrag indexes and does DBCC
IndexDefrag do as good of job as DBCC DBReindex or
Dropping and Recreating the index?

Ways to defrag an index:
1) DBCC IndexDefrag
2) DBCC DBReindex
3) Drop/Create Index

Dejan Sarka
9/14/2003 8:58:08 AM
[quoted text, click to view]

Yes, those are the ways. DBCC DBReindex actually recreates the index(es), so
it is equivalent to Drop/Create Index command. DBCC IndexDefrag has
different algorithm, it does the defragmentation using kind of bubble sort,
so it locks only two pages at a time. This way it does not disturb regular
users so much, but on the other hand it does not guarantee a complete
defragmentation.

--
Dejan Sarka, SQL Server MVP
FAQ from Neil & others at: http://www.sqlserverfaq.com
Please reply only to the newsgroups.
PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

Andrew J. Kelly
9/14/2003 9:49:30 AM
You might find this useful:

http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/sql/maintain/Optimize/SS2KIDBP.asp

--

Andrew J. Kelly
SQL Server MVP


[quoted text, click to view]

AddThis Social Bookmark Button