Heap Table

  • Hi

    I know that Heap Table means table with No clustered Index.My question is if a table has only non clustered index will the table is called as Heap Table ?

    Akkare.

  • Yes.

    John

  • Absolutely. It's like an on/off switch. Put a clustered index on the table, and the table becomes the clustered index. Without a clustered index, the table is a heap. That's all there is to it.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Thanks alot.

    One more doubt

    I have a table with Clustered Index and 2 Nonclustered Index.If I drop the Clustered Index what will happen for my table and nonclustered index.will my table re arrange the data ?

  • Both nonclustered indexes would have to be rebuilt to accomodate the removal of the cluster.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • That was informative..Till now i thought table doent having clustered or non-clustered index is called heap..

  • A table is a heap when data is unorganized. When you create a clustered index, it organizes the data based on a key (or keys). Non-clustered indexes are created outside the table.

Viewing 7 posts - 1 through 6 (of 6 total)

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