liveBook · Manning

Index scan

An index scan is a database query operation that traverses an index to locate or retrieve records matching query conditions.

How 3 Manning books explain it

Just Use Postgres!

An index scan is a database access strategy that retrieves matching table rows through an index rather than examining the entire table.

How it is used
Diagnoses query access paths and verifies whether PostgreSQL uses indexes instead of sequential scans.
How deep it goes
Explains execution-plan evidence, B-tree ordering, composite-index constraints, and timing, but does not develop planner internals.
Examples
Uses player lookups, score ranges, leaderboards, and partitioned heart-rate aggregation queries.
What you can do after
Diagnose query plans with EXPLAIN and confirm whether predicates use primary-key, B-tree, composite, or partition-local indexes.

Read how Just Use Postgres! explains index scan →

MongoDB 8.0 in Action, Third Edition

An index scan is query execution that traverses index entries to locate documents matching query conditions.

How it is used
Locates matching MongoDB records through index entries and helps assess whether a query avoids a collection scan.
How deep it goes
Explains IXSCAN in execution plans and statistics, including FETCH and covered queries, without detailing the scan’s internal algorithm.
Examples
Uses indexed movie-runtime queries, separately indexed $or clauses, and a covered movie projection with zero documents examined.
What you can do after
Diagnose/debug with explain("executionStats") to identify IXSCAN, inspect examined-key and document counts, and spot collection scans.

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

PostgreSQL Mistakes and How to Avoid Them

An index scan is a query execution method that retrieves matching rows by traversing a database index.

How it is used
Diagnoses PostgreSQL query performance by connecting predicates, selected columns, and execution plans to index usage.
How deep it goes
Explains predicate matching, table reads, and plan inspection, but does not develop broader PostgreSQL planner internals.
Examples
Uses timestamped payments, date_trunc predicates, EXPLAIN output, expression indexes, and Python psycopg fetch comparisons.
What you can do after
Diagnose index use with EXPLAIN, rewrite timestamp predicates as ranges, and choose narrower projections or matching expression indexes.

Read how PostgreSQL Mistakes and How to Avoid Them explains index 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.