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


Please Help Members By Posting Answers For Below Questions

Which tcp/ip port does sql server run on? How can it be changed?

585


Define ACID properties in a Database?

640


When does a workload on SQL Azure get throttled?

113


explain the storage models of olap? : Sql server database administration

529


What is a table called, if it has neither cluster nor non-cluster index? What is it used for?

608






How to populate a table in sql server?

517


Write the syntax for stuff function in an sql server?

544


Why truncate is ddl command?

524


Explain what is the purpose of sql profiler in sql server?

560


What are cursors? Explain the different types of cursors Enlist a few disadvantages of cursors.

629


What is lock escalation and what is its purpose?

564


What are different types of collation sensitivity?

544


How do I find information about the install locations for the various instances running on a computer?

564


What is the bookmark lookup and rid lookup?

580


What is the difference between stored procedure and user defined functions?

639