#65 Clustered Vs Non-Clustered Index

Need: Data/Records are Stored in heap,they are generally put up in the next available space over heap without any arrangement(Sorting).This kind of strategy is good when every time data is inserted,but when a selection over data is made on heap,we would encounter performance barrier and our selection query would be too slow because of our arrangement of Data over heap. Indexing provides a solution by defining an arrangement of records over heap.


1.Clustered Index :Only one Per Table and Uses B-Tree where each leaf node points to data in heap.They are sorted and B-Tree Structure Changes every time when an insertion is made.

2.Non-Clustered Index(NCI):There can be one or more NCI per Table and their leaf node does not point to data but instead point to address/Location.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s