Difference between Cluster and Non-cluster index?
Answer Posted / indranil
The clustered index is SORTED, and the nonclustered index is
UNSORTED.
For example, we have a pile of birth certificates in City
Hall, and we're going to make an index by birthday (birth
date, to be more exact.)
With a nonclustered index, it's like you have a bunch of
paper lists, each paper with a date, and the people born
under that date. You can quickly determine all people who
were born on August 4, 1986. However the papers themselves
are not sorted, so if you wanted to know all people born in
1986, or August 1986, you'll have to go through all the papers.
With a clustered index, the birth certificates themselves
are sorted by birth date, so searching for people born in
1986, or August 1986, January-June 1981, or any date range
is much faster. Also, it is easier to sort all the people by
birth date (since the data is already sorted).
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Can you change the data type of a column in a table after the table has been created? If so, which command would you use?
What do you understand by sql server agent?
What is the difference between SQL notification and SQL invalidation?
What is the difference between writing data to mirrored drives versus raid5 drives
How to assign new column names in a view?
How to recover from sql injection? : sql server security
What is the difference in accessing db between sql server vs sql azure?
What is a matrix in ssrs?
What are “phantom rows”?
What is database replication? What are the different types of replication you can set up in sql server?
What is the primary use of the model database?
What is a rownum?
What is the use of set nocount on/off statement?
List some case manipulation functions in sql?
What security features are available for stored procedure?