seniorT-SQL

What is SQL Server internal index seek vs scan decision boundary?

Updated May 17, 2026

Short answer

The optimizer chooses seek or scan based on estimated selectivity and cost comparison.

Deep explanation

Index seeks are efficient for highly selective predicates, while scans are preferred when a large portion of the table is accessed. The optimizer estimates row count using statistics and compares IO cost of random vs sequential access. If selectivity crosses a threshold, scan becomes cheaper due to reduced random IO overhead.

Unlock with a Pro subscription to view this section.

View pricing

Real-world example

No real-world example available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Common mistakes

No common mistakes listed yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Follow-up questions

No follow-up questions available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

More T-SQL interview questions

View all →