Friday 12 April 2013

what is difference between clustered index and non-clustered index

Clustered Index:

  • It is unique for any given table and we can have only on clustered index on a table.
  • The leaf level of a clustered index is the actual data and data is resorted in case of clustered index.
  • The order of the records in index and order of the records in the table must be same  then it is called as clustered index.
Non-clustered index :

  • The leaf level is actually a pointer to the data in rows so we can have as many non-clustered indexes as we can on the database.
  • The order of the values in index and order of the  values  in the table not be same  then it is called as non-clustered index.              

No comments:

Post a Comment