What is the difference between a full table scan and an index seek, and when might a full scan actually be preferable?
Last updated
A full table scan reads every page sequentially. An index seek navigates a B-tree directly to matching rows, ideal for highly selective predicates.
Seeks may need extra random I/O lookups to fetch non-indexed columns, which becomes costly when many rows match.
A full scan wins for low selectivity (roughly 5-20%+ of rows returned), small tables, or when no useful index exists.
- https://dev.mysql.com/doc/refman/9.7/en/mysql-indexes.html
- https://dev.to/devmatsu/how-relational-databases-find-database-understanding-table-and-index-scans-49d9
- https://dev.to/rhuturaj_takle/execution-plans-sql-server-3apj
- https://www.brentozar.com/archive/2019/10/how-to-think-like-the-sql-server-engine-whats-the-tipping-point/
- https://medium.com/silenttech/table-scan-vs-index-scan-vs-index-seek-f5cbb4e93478
- https://medium.com/@rohitsakhare/indexes-the-biggest-performance-lever-in-sql-and-why-more-isnt-always-better-416cf3db221f
- https://www.reddit.com/r/SQL/comments/cpdjhj/why_is_full_table_scan_sometimes_faster_than/