difference b/w clustered and non-clustered index...
-
-
please let me know the difference b/w clustered and non-clustered index... in sQL server in simple language....eventhough i searched in google im not clear abt the exact diff and in which scenario use these indexes...(clustered and non clustered)
Basically the main difference is that both are B-tree indexes but clustered index causes the data in the table to be sorted based on the indexed columns. This is why a single table cannot have multiple clustered indexes. Nonclustered index is like an index at the end of a book. Entries are sorted and there are pointers (page numbers in book) referencing the actual place for the data. Have a look at this: Nonclustered Index Structures [^] Regards, mika
The need to optimize rises from a bad design.My articles[^]
-
Basically the main difference is that both are B-tree indexes but clustered index causes the data in the table to be sorted based on the indexed columns. This is why a single table cannot have multiple clustered indexes. Nonclustered index is like an index at the end of a book. Entries are sorted and there are pointers (page numbers in book) referencing the actual place for the data. Have a look at this: Nonclustered Index Structures [^] Regards, mika
The need to optimize rises from a bad design.My articles[^]
Mika Wendelius wrote:
data in the table to be sorted
Don't you mean sorted and
STORED
using the clustered index, I think that is the most relevant part.Never underestimate the power of human stupidity RAH
-
Mika Wendelius wrote:
data in the table to be sorted
Don't you mean sorted and
STORED
using the clustered index, I think that is the most relevant part.Never underestimate the power of human stupidity RAH
-
Yap, exactly. I was thinking the table as a permanent object but it's a good idea to clearly point that out. Thanks.
The need to optimize rises from a bad design.My articles[^]
It's been a while since we saw you here, welcome back.
Never underestimate the power of human stupidity RAH
-
It's been a while since we saw you here, welcome back.
Never underestimate the power of human stupidity RAH