liveBook · Manning

Sequential scan

A sequential scan is a search or query operation that examines items in a table or collection in sequence to identify those matching a condition, rather than locating them through an index.

How 3 Manning books explain it

Just Use Postgres!

A sequential scan, or full table scan, examines every row of a table to find rows matching a query rather than locating them through an index.

How it is used
Uses full-row inspection to answer queries when no suitable index exists or scanning is judged efficient.
How deep it goes
Explains linear behavior, filtering, row counts, parallel execution, and planner tradeoffs without detailing scan implementation internals.
Examples
Demonstrates scans on player wins, score ranges, champion titles, JSON fields, time-series measurements, and message queues.
What you can do after
Diagnose/debug with EXPLAIN by identifying Seq Scan nodes, filters, rejected rows, timing, and possible indexing opportunities.

Read how Just Use Postgres! explains sequential scan →

PostgreSQL Mistakes and How to Avoid Them

A full table scan is a query execution method that examines rows throughout a table rather than locating them through a selective index lookup.

How it is used
Diagnoses slow PostgreSQL queries whose plans scan entire tables instead of using selective indexes.
How deep it goes
Explains plan inspection, predicate matching, partial indexes, foreign-key indexing, and expression-predicate workarounds without exhaustive index-type detail.
Examples
Uses open-ticket counts, timestamped payments, and invoice lookups by customer to compare scan and index-backed plans.
What you can do after
Diagnose/debug with it by reading PostgreSQL plans and selecting predicate-aligned indexing or query rewrites.

Read how PostgreSQL Mistakes and How to Avoid Them explains sequential scan →

MongoDB 8.0 in Action, Third Edition

A collection scan is query execution that examines documents throughout a collection to find matches without relying on an applicable index.

How it is used
Explains how MongoDB retrieves matches when no applicable index supports a query.
How deep it goes
Explains scan behavior, index trade-offs, $or requirements, and selectivity, but does not detail scan internals.
Examples
Uses server-log queries and an unindexed movie-rating $or clause to demonstrate collection-scan behavior.
What you can do after
Diagnose collection scans with explain and improve eligible $or queries by adding supporting indexes.

Read how MongoDB 8.0 in Action, Third Edition explains sequential scan →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.