Plan nodes · Joins

Hash

Builds the hash table for its parent Hash Join.

Reads its child completely into an in-memory hash table: the build side of a Hash Join. Its figures show the buckets, the batches and the memory used.

Example

SELECT a.name, count(*) FROM artists a JOIN albums b ON b.artist_id = a.id GROUP BY a.name

6 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 · Merge Join · Memoize · Materialize