The Anubhav portal was launched in March 2015 at the behest of the Hon'ble Prime Minister for retiring government officials to leave a record of their experiences while in Govt service .
Table data is stored sorted based on the index key
Only ONE per table (because data can be sorted one way only)
Faster for range queries and ordered data
Example:
CREATE CLUSTERED INDEX IX_Employee_Id
ON Employees(Id);
Non-Clustered Index
Stores a separate structure from the table
Contains key + pointer (row locator) to actual data
You can create MULTIPLE non-clustered indexes
Faster for search/filter queries
Example:
CREATE NONCLUSTERED INDEX IX_Employee_Name
ON Employees(Name);
Key Differences
Feature
Clustered Index
Non-Clustered Index
Data Storage
Actual data is sorted
Separate from table
Number per Table
Only 1
Multiple allowed
Speed
Faster for range scans
Faster for lookups
Structure
Leaf node = data
Leaf node = pointer to data
Simple Analogy
Clustered Index → Like a sorted book (pages in order)
Non-Clustered Index → Like a book index page (points to page numbers)
When to Use
Use Clustered Index on:
Primary Key
Frequently sorted columns
Use Non-Clustered Index on:
Search/filter columns
Columns used in WHERE, JOIN, ORDER BY
Final Thought
A good combination of clustered + non-clustered indexes can dramatically improve query performance, but too many indexes can slow down
INSERT/UPDATE/DELETE operations.
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Clustered Index
Example:
Non-Clustered Index
Example:
Key Differences
Simple Analogy
When to Use
Use Clustered Index on:
Use Non-Clustered Index on:
WHERE,JOIN,ORDER BYFinal Thought
A good combination of clustered + non-clustered indexes can dramatically improve query performance, but too many indexes can slow down INSERT/UPDATE/DELETE operations.