Being able to design a clustered index is a means of ordering the data as it is stored within a logical volume. An index seek is akin to accessing an array by its index. An index scan is akin to iterating over the entire array until you find the relevant items. The clustered index is what determines the order. Additionally, SQL Server will take sargable predicates and attempt a binary search to get in the rough area of the table where the relevant rows are.
So, yes, the clustered index is very beneficial. Most other SQL implementations get by using nonclustered indexes for this purpose, and it works well enough.
View all comments
Show parent comment
5
u/Solonotix 7d ago
Being able to design a clustered index is a means of ordering the data as it is stored within a logical volume. An index seek is akin to accessing an array by its index. An index scan is akin to iterating over the entire array until you find the relevant items. The clustered index is what determines the order. Additionally, SQL Server will take sargable predicates and attempt a binary search to get in the rough area of the table where the relevant rows are.
So, yes, the clustered index is very beneficial. Most other SQL implementations get by using nonclustered indexes for this purpose, and it works well enough.