↑↓ 选择↵ 打开⌫ 切换范围完整搜索

PG.CENTER 连接 PostgreSQL 文档、百科与生态知识。由 Pigsty 维护。

Wiki / 执行计划

Hash

Builds the hash table consumed by a hash join.

当前阅读 PG 18·选择有来源记录的版本

此版本暂无所选语言的定义,以下显示原始英文内容。

Core node tag
T_Hash
Structured EXPLAIN Node Type
Hash
Inputs
The hash join inner child plan
Output
Hash table, not a normal tuple stream
Executor initializer
ExecInitHash
Memory mechanism
hash-batches
evidence kind
source and documentation
explain names
Hash
explain prefixes
Parallel, Async
node tag
T_Hash
parallel callbacks
ExecHashEstimate, ExecHashInitializeDSM, ExecHashInitializeWorker, ExecHashRetrieveInstrumentation
partial modes
未知
runtime verified
false
strategies
未知

版本定义 PG 18

Builds the hash table consumed by a hash join.

EXPLAIN labels in this source build

Text-format labelStructured node identity
HashHash

比较版本

完整来源事实

memory

{"description":"Hash-join execution can partition work into batches backed by temporary files. This describes hash-join batching, not the spill policy of aggregate or Memoize nodes.","evidence":[{"archive_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","label":"src/backend/executor/nodeHash.c","path":"src/backend/executor/nodeHash.c","sha256":"f83e9b10129450f2dc52ac7ea5147b7c51c12648ae1b3b3195bb3f0b4895fafc","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},{"archive_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","label":"src/backend/executor/nodeHashjoin.c","path":"src/backend/executor/nodeHashjoin.c","sha256":"4a72b0db253c1905c415462cfe56a2327ac65507c607b6d699d2717fa624ad56","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"}],"mechanism":"hash-batches","source_notes":["It's time to begin hashing, or if we just arrived here then hashing is already underway, so join in that effort. While hashing we have to be prepared to help increase the number of batches or buckets at any time, and if we arrived here when that was already underway we'll have to help complete that work immediately so that it's safe to access batches and buckets below.","Make sure that any tuples we wrote to disk are visible to others before anyone tries to load them.","Elect one backend to disable any further growth. Batches are now fixed. While building them we made sure they'd fit in our memory budget when we load them back in later (or we tried to do that and gave up because we detected extreme skew).","Parallel Hash tries to use the combined hash_mem of all workers to avoid the need to batch. If that won't work, it falls back to hash_mem per worker and tries to process batches in parallel."]}

source inventory

{"executor":"src/backend/executor/execProcnode.c","explain":"src/backend/commands/explain.c","implementation":"src/backend/executor/nodeHash.c"}

来源引用

完整定义与证据 JSON

定义来源

center · PostgreSQL 18 · 555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f

正文语言: en · 555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f