Plan nodes · Joins

Materialize

Stores its input in memory so it can be read again.

Reads its child once and keeps the rows, usually so that a Nested Loop can rescan the inner side without recomputing it. Spills to disk past work_mem.

Example

SELECT a.name, p.name FROM artists a, playlists p WHERE a.id < 4 AND p.id < 300

4 nodes

Run with EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) on the sample database, PostgreSQL 19.0. Open it in the EXPLAIN visualizer →

Related

Nested Loop · Hash Join · Hash · Merge Join · Memoize