pencilCake
pencilCake

Reputation: 53323

Does HEAP mean the same thing with a table that has Non-Clustered index?

In terms of SQL terminology, does HEAP stands for a table that has Non-Clustered index?

Or there is a nuance or it has completely a different meaning?

Upvotes: 0

Views: 594

Answers (3)

LazyProgrammer
LazyProgrammer

Reputation: 197

A heap is a table without a clustered index. Heaps have one row in sys.partitions, with index_id = 0 for each partition used by the heap. By default, a heap has a single partition. When a heap has multiple partitions, each partition has a heap structure that contains the data for that specific partition.

Upvotes: 0

Diego
Diego

Reputation: 36176

A heap is a table without a clustered index. Simple as that!

Upvotes: 0

Duncan Gravill
Duncan Gravill

Reputation: 4702

A heap can have either no index at all or a non-clustered index. But a clustered table can also have non-clustered indexs on top so -

does HEAP stands for a table that has Non-Clustered index?

is not a great definition as a table with a non-clustered index could be either a clustered table or a heap.

Upvotes: 0

Related Questions