A database index is a data structure that improves the speed of data retrieval operations on a database table at the cost of slower writes and the use of more storage space. Indexes can be created using one or more columns of a database table, providing the basis for both rapid random look ups and efficient access of ordered records.
There are basically two types of indexes: Clustered Indexes and Non-Clustered Indexes. Both uses “B-TREE” for searching data. However, storage of physical data differs.
- Clustered Indexes: In clustered index, the non-leaf level points to the actual data.
![Clustered Indexes](http://www.geekphilip.com/wp-content/uploads/2013/06/Clustered-Indexes.png)
- Non-Clustered Indexes: In Non-Clustered index the leaf nodes point to pointers, which then point to actual data.
![Non-Clustered Indexes](http://www.geekphilip.com/wp-content/uploads/2013/06/Non-Clustered-Indexes.png)
Perfect explanation…
Thanks
Nice Diagram
Great article, the diagrams help a lot.