, , , , :
select Name from Table where Group = 42
Since the comparison is a direct value, it can easily be used to determine the part of the index in which the elements are located.
Scanning is used when the condition is more complex, so that each value in the index must be evaluated, for example, in a query like:
select Name from Table where right(cast(group as varchar), 2) = '00'
Since the condition uses the calculated value from the index, which cannot be easily used to extract part of the index, all elements must be evaluated.
source
share