Difference between Clustered & Non- Clustered Index.
Difference between Clustered and Nonclustered Indexes in SQL?
1) Clustered Index physically store & sort all rows while Nonclustered Index doesn't (store in logical way).
2) In SQL one table can only have one Clustered Index but there is no such restriction on NonClustered Index.
3) In many relational databases Clustered Index is automatically created on primary key creation.
4) Always create Indexes on columns which is frequently used in SELECT query because there is huge performance difference between indexed and non indexed column in SQL queries.
5) Non Cluster Index is fast then Cluster index.
6) A non-clustered index is useful for columns that have some repeated values. Say for example, AccountType column of a bank database may have 10 million rows
7) A clustered index (SQL Server, MySQL/InnoDB) is a table stored in an index B-Tree structure. There is no second data structure (heap-table) for the table.
8) A non-clustered index is an index that refers to another data structure containing further table columns.
9) Accessing table data via a secondary index (index on a clustered index) is slower than a similar query on a heap-table.
