Question on DBCC SHOWCONTIG / DBCC DBREINDEX

  • I have a table that after running a DBCC DBREINDEX whos the following results when a DBCC SHOWCONTIG ( SECRETTABLE) WITH TABLERESULTS,ALL_INDEXES

    ObjectNameObjectIdIndexNameIndexIdLevelPagesRowsMinimumRecordSizeMaximumRecordSizeAverageRecordSizeForwardedRecordsExtentsExtentSwitchesAverageFreeBytesAveragePageDensityScanDensityBestCountActualCountLogicalFragmentationExtentFragmentation
    SecretTable549576996002531517226220121.3530000000000104645698.6909790039062591.36779022216796969.565217391304344324699.60474395751953180.434783935546875

    I don't understand why the extent and logical fragmentation remain so high after a reindex.

    This is a 3rd party app and SecretTable is a pseudonym but is it because there are no indexes (clustered or otherwise) on the table?

    I have seen something similar with tables where there is a clustered index but I am guessing that the remaining high fragmentation in those cases is something to do with the number of records and the size of those records?

  • Any fragmentation within a table itself cannot be removed without a clustered index. If you don't want a clustered index on your table just add one and remove it, your fragmentation will be removed.

    Heaps are a bit of a pain this way, they should only be used for pure inserts, otherwise they always fragment eventually.

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply