Index - SQL

Indexes in SQL Server are similar to the indexes in books. They help SQL Server retrieve the data quicker.
Types of indexes
  • Clustered indexes :
    When you create a clustered index on a table, all the rows in the table are stored in the order of the clustered index key. So, there can be only one clustered index per table.
     
  • Non-clustered indexes :
    Non-clustered indexes have their own storage separate from the table data storage. Non-clustered indexes are stored as B-tree structures (so do clustered indexes), with the leaf level nodes having the index key and it’s row locater.