PostgreSQL plan nodes
Every line of an EXPLAIN plan is an executor node — one step PostgreSQL takes to run your query. This is a plain-language reference for all 44 of them: what each node does, when the planner chooses it, and whether seeing it should worry you.
Pasting a plan into the plan analyzer ? Click the next to any node to read its explanation inline.
Table access
Sample ScanReads a random sample of a table for TABLESAMPLE queries.
Seq ScanReads every row of a table from start to finish.
Tid Range ScanScans a contiguous range of physical row locations.
Tid ScanFetches rows directly by their physical location (ctid).
Index access
Bitmap Heap ScanReads heap pages in physical order from a bitmap of matching rows.
Bitmap Index ScanScans an index to build a bitmap of matching row locations.
BitmapAndIntersects bitmaps from multiple indexes (AND).
BitmapOrUnions bitmaps from multiple indexes (OR).
Index Only ScanAnswers the query from the index alone — no table fetch — when pages are all-visible.
Index ScanWalks an index to find matching rows, then fetches each from the table.
Joins
Aggregation & grouping
AggregateComputes aggregates like count, sum, avg — plain, sorted, or hashed.
GroupCollapses adjacent equal rows in sorted input (GROUP BY without aggregates).
SetOpImplements INTERSECT and EXCEPT (with ALL variants).
UniqueRemoves adjacent duplicate rows from sorted input.
WindowAggComputes window functions (OVER ...) across ordered partitions.
Ordering, materializing & caching
Incremental SortSorts only by the remaining keys when input is already partially ordered.
MaterializeBuffers a child's rows once so they can be re-read cheaply.
MemoizeCaches inner-side results keyed by parameters, for repeated lookups.
SortOrders rows — in memory if it fits work_mem, otherwise on disk.
Combining & control flow
AppendConcatenates the outputs of several child plans (UNION ALL, partitions).
LimitStops after N rows (and skips OFFSET rows).
LockRowsTakes row-level locks for SELECT ... FOR UPDATE / FOR SHARE.
Merge AppendMerges already-sorted child outputs while preserving global order.
ProjectSetEvaluates set-returning functions in the SELECT list.
Recursive UnionDrives WITH RECURSIVE CTEs by iterating until no new rows appear.
ResultEmits computed rows, or gates execution on a one-time condition.
Parallelism
GatherCollects rows from parallel worker processes into the leader.
Gather MergeCollects rows from workers while preserving sorted order.
Parallel Seq Scan, Parallel Index Scan, Parallel Hash, …Worker-cooperating variants of scans, hashes, and appends.
Derived & virtual scans
CTE ScanReads the materialized result of a WITH (CTE) query.
Custom ScanA scan provided by an extension (e.g. a GPU/columnar engine).
Foreign ScanReads rows from a foreign table via a foreign data wrapper.
Function ScanReads rows returned by a set-returning function in FROM.
Named Tuplestore ScanReads trigger transition tables (OLD/NEW row sets).
Subquery ScanReads the output of a subquery that couldn't be flattened.
Table Function ScanReads rows from XMLTABLE / JSON_TABLE.
Values ScanReads rows from an inline VALUES list.
WorkTable ScanReads the working set of the current recursion step.