我有一种情况,某个vertica
查询在其计划中有GROUP_BY_SPILLED
(做一个GROUP BY HASH
)。
我没有选择更改投影顺序(以避免分组哈希),所以我想增加此步骤接收的内存量。
假设我的查询收到了5GB
的预算。 5GB
如何在查询步骤中分布?
我找不到任何文件。
使用PROFILE运行查询:
PROFILE SELECT .. FROM .. GROUP BY ..
从输出中获取statement_id并使用它来调查EXECUTION_ENGINE_PROFILES。
给定一个只执行GROUP BY
的简单查询,运行:
SELECT path_id,
operator_name,
counter_name,
sum(counter_value)
FROM v_monitor.execution_engine_profiles
WHERE transaction_id=<STATEMENT_ID>
AND counter_name ilike 'current memory capacity (bytes)'
GROUP BY 1,2,3
ORDER BY path_id;
path_id | operator_name | counter_name | sum
---------+---------------+---------------------------------+------------
-1 | NewEENode | current memory capacity (bytes) | 0
-1 | Root | current memory capacity (bytes) | 0
1 | ExprEval | current memory capacity (bytes) | 0
1 | GroupByHash | current memory capacity (bytes) | 1406074880
1 | GroupByPipe | current memory capacity (bytes) | 0
1 | ParallelUnion | current memory capacity (bytes) | 0
1 | StorageUnion | current memory capacity (bytes) | 0
2 | ExprEval | current memory capacity (bytes) | 0
2 | Scan | current memory capacity (bytes) | 0
有关更多信息在Vertica here中
我不认为你可以修改或改进这些计数器值,除了使用RESOURCE POOLS增加查询预算