views:

193

answers:

1

I'm curious to see if anyone knows how is the data physically arranged in tables that don't have an index (not even a PK). In this question the OP claims it is taking a long time to drop a clustered PK. I know that the clustered index is the data itself, but what would be the new data arrangement that explains the long processing time?

+4  A: 

It will be a HEAP:

A heap table, by definition, is a table that doesn't have any clustered indexes.

Different pages of the heap-based table occupy different non-contiguous areas on a disk, and they are not linked together in any way.

Each non-clustered index defined on the table will have a corresponding entry in a sysindexes table with an indid between 2 and 254, pointing to the first IAM (Index Allocation Map) page.

IAM pages represent the linked list of all pages used by the database object (table or index) and used by SQL Server for allocating and deallocating storage space.

It is important to remember that IAM pages are not used to search through data or index pages, but only to allocate and deallocate them.

Quassnoi
Hmm the link above gives me a 404.
Otávio Décio