我遇到这样的情况,某个EPERM
查询的计划中包含vertica
(执行GROUP_BY_SPILLED
)。
我没有选择更改投影顺序的选项(以避免按哈希分组),因此我想增加此步骤接收的内存量。
比方说,我的查询收到的预算为GROUP BY HASH
。
5GB
在整个查询步骤中如何分布?
我找不到任何文档。
答案 0 :(得分:1)
使用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来增加查询预算外,我认为您无法修改或改善这些计数器的值