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 .
Understanding how SQL Server reads data is key to performance tuning. Two common operations you’ll see in execution plans are
Index Seek and Index Scan.
What is INDEX SEEK?
An Index Seek is a targeted lookup.
SQL Server uses the index to jump directly to matching rows
Very fast and efficient
Works when your query has selective filters
Example:
SELECT * FROM Employees
WHERE Id = 100;
If Id is indexed, SQL Server performs an Index Seek
What is INDEX SCAN?
An Index Scan reads a large portion (or all) of the index.
SQL Server scans multiple rows/pages
Slower compared to seek (for large tables)
Happens when filtering is not selective
Example:
SELECT * FROM Employees
WHERE Name LIKE '%John%';
Leading wildcard prevents index usage → Index Scan
Key Differences
Feature
INDEX SEEK
INDEX SCAN
Data Access
Direct lookup
Sequential scan
Performance
Fast
Slower (large data)
Use Case
Exact/filtered queries
Broad/unfiltered queries
Efficiency
High
Low (for large tables)
When Does SQL Server Choose Each?
Index Seek:
WHERE Id = 10
WHERE Email = 'test@mail.com'
Proper indexing + selective condition
Index Scan:
WHERE Name LIKE '%abc%'
No index on column
Large result set
Important Note
Index Scan is not always bad
For small tables → scan can be faster
When most rows are needed → scan is logical
How to Improve (Convert Scan → Seek)
Add proper indexes
Avoid leading wildcards (%abc)
Use correct data types
Write optimized WHERE clauses
Example Optimization
Bad:
WHERE Name LIKE '%John%'
Better:
WHERE Name LIKE 'John%'
Final Thought
Index Seek = Fast, precise search
Index Scan = Broad, full scan
A good database design aims to maximize seeks and minimize unnecessary scans for better performance.
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.
Understanding how SQL Server reads data is key to performance tuning. Two common operations you’ll see in execution plans are Index Seek and Index Scan.
What is INDEX SEEK?
Example:
If
Idis indexed, SQL Server performs an Index SeekWhat is INDEX SCAN?
Example:
Leading wildcard prevents index usage → Index Scan
Key Differences
When Does SQL Server Choose Each?
Index Seek:
WHERE Id = 10WHERE Email = 'test@mail.com'Index Scan:
WHERE Name LIKE '%abc%'Important Note
How to Improve (Convert Scan → Seek)
%abc)Example Optimization
Bad:
Better:
Final Thought
A good database design aims to maximize seeks and minimize unnecessary scans for better performance.