Home > Archive > MS SQL Server > October 2006 > can tables themselves be fragmented? Index ID 0?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author can tables themselves be fragmented? Index ID 0?
Cory Harrison

2006-10-25, 6:00 am

When I run DBCC SHOWCONTIG I see several tables who appear to be horribly
fragmented for index ID 0. I'm assuming this is the table itself? If so,
what do I do about it? I can't enter this ID into DBCC INDEXDEFRAG. All of
my indexes with ID's 1 and on up appear to be fine, it's just these ID 0's
that look bad.


thanks,
Cory





Tibor Karaszi

2006-10-25, 6:00 am

> When I run DBCC SHOWCONTIG I see several tables who appear to be horribly
> fragmented for index ID 0.


Judging by what value? See my other post. There's no order for rows in a heap, so scan density etc.
are meaningless for a heap.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www. solidqualitylearning
.com/



"Cory Harrison" <charrison@csiweb.com> wrote in message
news:%23NBNJIr9GHA.3344@TK2MSFTNGP03.phx.gbl...
> When I run DBCC SHOWCONTIG I see several tables who appear to be horribly
> fragmented for index ID 0. I'm assuming this is the table itself? If so,
> what do I do about it? I can't enter this ID into DBCC INDEXDEFRAG. All of
> my indexes with ID's 1 and on up appear to be fine, it's just these ID 0's
> that look bad.
>
>
> thanks,
> Cory
>
>
>
>
>


Andrew Pike

2006-10-25, 6:00 am

Hi Cory,

These tables to which you refer are heap tables, those that do not have a
clustered index defined on them. The data pages for heaps are not stored in
any particular order, which would explain why the fragmentation values are
high. Consider creating an appropriate clustered index on these tables if
you want to reduce the observed fragmentation.

Kind Regards

Andrew Pike
--
SQL Server DBA
UBS IB



"Cory Harrison" wrote:

> When I run DBCC SHOWCONTIG I see several tables who appear to be horribly
> fragmented for index ID 0. I'm assuming this is the table itself? If so,
> what do I do about it? I can't enter this ID into DBCC INDEXDEFRAG. All of
> my indexes with ID's 1 and on up appear to be fine, it's just these ID 0's
> that look bad.
>
>
> thanks,
> Cory
>
>
>
>
>
>

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com