patternsqlModerate
When is a full table scan better than index scan?
Viewed 0 times
fullscanthanbetterwhenindextable
Problem
What are some scenarios (in SQL Server) in which a full table scan is better than an index scan?
Solution
When the
The 2nd case needs qualifying
Finally
- table is small enough there is no practical difference
- statistically, you'd return most rows anyway
The 2nd case needs qualifying
- An index scan will replace an index seek if an index is covering
- An index seek or scan with many rows that requires key/bookmark lookups will be expensive and a table scan could be better
Finally
- An index scan and a table scan are pretty much the same for clustered indexes
Context
StackExchange Database Administrators Q#11679, answer score: 11
Revisions (0)
No revisions yet.