October 4, 2011 at 7:28 am
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.
October 4, 2011 at 7:36 am
Yes.
John
October 4, 2011 at 8:19 am
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
October 4, 2011 at 8:33 am
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 ?
October 4, 2011 at 8:34 am
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
October 5, 2011 at 8:47 am
That was informative..Till now i thought table doent having clustered or non-clustered index is called heap..
October 5, 2011 at 10:09 am
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