Pages

Search This Blog

Showing posts with label scan. Show all posts
Showing posts with label scan. Show all posts

Monday, October 25, 2010

[T-SQL] Difference between Index Scan and Index Seek

Index Scan:Since a scan touches every row in the table whether or not it qualifies, the cost is proportional to the total number of rows in the table. Thus, a scan is an efficient strategy if the table is small or if most of the rows qualify for the predicate.

Index Seek:Since a seek only touches rows that qualify and pages that contain these qualifying rows, the cost is proportional to the number of qualifying rows and pages rather than to the total number of rows in the table.