Plan nodes · Scans
WorkTable Scan
Reads the previous iteration's rows inside WITH RECURSIVE.
In the recursive part of a WITH RECURSIVE query, this reads the rows produced by the previous step, the "work table", to compute the next.
Example
WITH RECURSIVE n(i) AS (SELECT 1 UNION ALL SELECT i + 1 FROM n WHERE i < 10) SELECT i FROM n
4 nodes
- Resultrows 1 (estimated 1) cost 0..0.01
Run with EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) on the sample database, PostgreSQL 19.0. Open it in the EXPLAIN visualizer →
Related
Seq Scan · 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 · Named Tuplestore Scan · Foreign Scan · Custom Scan