An index
scan means that SQL Server reads all the rows in a table, and then returns only
those rows that satisfy the search criteria. When an index scan is performed,
all the rows in the leaf level of the index are scanned. This essentially means
that all the rows of the index are examined instead of the table directly. This
is sometimes compared to a table scan, in which all the table data is read
directly. However, there is usually little difference between an index scan and
a table scan.
An index seek, on the other hand, means that the
Query Optimizer relies entirely on the index leaf data to locate rows
satisfying the query condition. An index seek will be most beneficial in cases
where a small percentage of rows will be returned. An index seek will only
affect the rows that satisfy a query condition and the pages that contain these
qualifying rows; in terms of performance, this is highly beneficial when a
table has a very large number of rows.
No comments :
Post a Comment