Add Birthday
indexes,
3 replies to this topic
Ramesh M
#1
|
Member
14
Points
|
Posted on
09 Nov 2011 03:27 PM IST
Hi,
Please explain the difference b/t clustered and non-clusterd indexes.
Thanks in advance.
Regards,
Ramesh
|
SQL Server
1069
views
Reply to this topic
|
Cherukuri Venkateswarlu
#2
|
Member
140
Points
|
Replied on
10 Nov 2011 05:18 AM IST
Indexes are of two types. Clustered indexes and non-clustered indexes.
When you craete a clustered index on a table, all the rows in the table are stored in the order of the clustered index key. So, there can be only one clustered index per table.
Non-clustered indexes have their own storage separate from the table data storage. Non-clustered indexes are stored as B-tree structures (so do clustered indexes), with the leaf level nodes having the index key and it's row locater. The row located could be the RID or the Clustered index key, depending up on the absence or presence of clustered index on the table.
|
Reply to this topic
|
Harikrishna Sikhakolli
#3
|
Member
108
Points
|
Replied on
20 Mar 2012 02:48 PM IST
when we create a primary key on the table it default creates clusterd index .
when we create a unique key on the table it default creates nonclusterd index .
just remember not viceversa.
|
Reply to this topic
|
Subramaniam R
#4
|
Member
152
Points
|
Replied on
06 Aug 2013 04:51 PM IST
when we create a primary key on the table it default creates clusterd index . when we create a unique key on the table it default creates nonclusterd index .
|
Reply to this topic
|
|
|