Plan nodes · Scans
Seq Scan
Reads every page of a table, in order.
The simplest way to read a table: every page, from first to last, checking each row against the filter. It is the cheapest plan when a query needs a large share of the rows, because sequential reads are fast and there is no index to consult. Rows the filter rejects are counted as "removed by filter".
What to look for
A Seq Scan with a selective filter on a big table ("removed by filter" in the millions, few rows out) usually means a missing index, or a condition the index cannot use (a function on the column, a type mismatch).
Example
SELECT * FROM artists WHERE country = 'JP'
1 node
- Seq Scan on artistsrows 250 (estimated 250) cost 0..38 buffers: 13 hitfilter
(country = 'JP'::text)1,750 removed by the filter
Run with EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) on the sample database, PostgreSQL 19.0. Open it in the EXPLAIN visualizer →
Related
Index Scan · Index Only Scan · Bitmap Index Scan · Bitmap Heap Scan · BitmapAnd · BitmapOr · Tid Scan · Tid Range Scan · Sample Scan · Subquery Scan · Function Scan · Table Function Scan · Values Scan · CTE Scan · WorkTable Scan · Named Tuplestore Scan · Foreign Scan · Custom Scan