Index Scan vs Seq Scan

Noun · Development

Definitions

  1. Two fundamental data access methods in databases. An index scan uses a B+ tree index to jump directly to matching rows — fast for selective queries. A sequential (full table) scan reads every row — faster when returning a large fraction of the table (the random I/O overhead of index scans exceeds sequential I/O). The query planner chooses based on statistics.

    In plain English: The database choosing between jumping to specific rows via an index (fast for few rows) or scanning the entire table (fast for many rows).

    Example: "The query planner chose a seq scan because WHERE status = 'active' matches 80% of rows — an index scan would be slower due to random I/O."

Related Terms