SQL Server Interview Question #133

What is the difference between an Index Seek and an Index Scan?

Indexes & Query Performance Senior Advanced

Detailed Explanation

An Index Seek navigates an index to locate a targeted key range, while an Index Scan reads a larger portion or all of an index.

A seek is often efficient for selective predicates, but a scan is not automatically bad. If a query needs a large percentage of a table, scanning can be cheaper than performing many seeks and lookups.

The correct judgment comes from row counts, I/O, CPU, elapsed time, cardinality estimates, and the complete execution plan.