Thursday, March 22, 2012

Dbcc Showcontig

DBCC SHOWCONTIG scanning 'MYTAB' table...
Table: 'MYTAB'(50099219); index ID: 1, database ID: 7
TABLE level scan performed.
- Pages Scanned........................: 150
- Extents Scanned.......................: 25
- Extent Switches.......................: 25
- Avg. Pages per Extent..................: 6.0
- Scan Density [Best Count:Actual Count]......: 73.08% [19:26]
- Logical Scan Fragmentation ..............: 1.33%
- Extent Scan Fragmentation ...............: 96.00%
- Avg. Bytes Free per Page................: 878.5
- Avg. Page Density (full)................: 89.15%
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

Since Extents Scanned and Extent Switches r equal, why the density is slow, what about pages per Extent, can it be manaully increased?

HowdyI think the reason lies in the fact that you have 2 pages per extent occupied by different objects. If you had 8 pages per extent, the table would take up approx. 19 extents (19*8-Best count). Look up DBCC DBREINDEX and DBCC INDEXDEFRAG in BOL. mojza

No comments:

Post a Comment