.NET and SQL Server Interview Question - How does index makes search faster?
Shivprasad Koirala
For better understanding, let us consider a simple search example which shows differences between a table, declared with index and without index. Let's first see an example for a table which is created without declaring an index and look how exactly the SQL search engine will perform action. Below diagram will give u better idea…
In the above example, SQL search engine will search from initial till it finds the respective record and once the record is found it will basically display the record. Further, When we create an index on any column of a table then the large data get divided like following B-Tree diagram, so that search becomes easier and faster.
B-tree structure of a SQL Server index