mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-12 18:34:36 +08:00
Skip allocating hash table in EXPLAIN-only mode.
Author: Alexey Bashtanov Discussion: https://www.postgresql.org/message-id/36823f65-050d-ae24-aa4d-a37726998240%40imap.cc
This commit is contained in:
parent
dfab7f2f94
commit
2cccb627f1
@ -3665,7 +3665,11 @@ ExecInitAgg(Agg *node, EState *estate, int eflags)
|
|||||||
&aggstate->hash_ngroups_limit,
|
&aggstate->hash_ngroups_limit,
|
||||||
&aggstate->hash_planned_partitions);
|
&aggstate->hash_planned_partitions);
|
||||||
find_hash_columns(aggstate);
|
find_hash_columns(aggstate);
|
||||||
build_hash_tables(aggstate);
|
|
||||||
|
/* Skip massive memory allocation if we are just doing EXPLAIN */
|
||||||
|
if (!(eflags & EXEC_FLAG_EXPLAIN_ONLY))
|
||||||
|
build_hash_tables(aggstate);
|
||||||
|
|
||||||
aggstate->table_filled = false;
|
aggstate->table_filled = false;
|
||||||
|
|
||||||
/* Initialize this to 1, meaning nothing spilled, yet */
|
/* Initialize this to 1, meaning nothing spilled, yet */
|
||||||
|
Loading…
Reference in New Issue
Block a user