Wednesday, March 7, 2012

Index Defrags

Say you've got a large table that you're no longer
reindexing but are using instead INDEXDEFRAG. Does
INDEXDEFRAG pad the pages with the FILLFACTOR?
This is important to me because it has a clustered index
so I want to make sure we're not getting page splits.
Also, does INDEXDEFRAG reclaim space that would occur
from any deletes that you've done in a table?From BooksOnLine under DBCC INDEXDEFAG:
DBCC INDEXDEFRAG also compacts the pages of an index, taking into account
the FILLFACTOR specified when the index was created. Any empty pages created
as a result of this compaction will be removed. For more information about
FILLFACTOR, see CREATE INDEX.
It does this when it can but there is no guarentee the fill factor will be
adjusted on all the pages. It depends on what it has to do, how much
fragmentation etc that exists. A few page splits are not a problem and can
not usually be avoided altogether. If you need a solid fill factor then
REINDEX is the only way to guarantee it on every page. Take a look here for
more details:
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx
--
Andrew J. Kelly SQL MVP
"BoBl" <anonymous@.discussions.microsoft.com> wrote in message
news:1e6aa01c45566$bc7780b0$a101280a@.phx.gbl...
> Say you've got a large table that you're no longer
> reindexing but are using instead INDEXDEFRAG. Does
> INDEXDEFRAG pad the pages with the FILLFACTOR?
> This is important to me because it has a clustered index
> so I want to make sure we're not getting page splits.
> Also, does INDEXDEFRAG reclaim space that would occur
> from any deletes that you've done in a table?

No comments:

Post a Comment