如何在Vertica计划步骤中进行内存分配?

问题描述 投票:0回答:1

我有一种情况,某个vertica查询在其计划中有GROUP_BY_SPILLED(做一个GROUP BY HASH)。

我没有选择更改投影顺序(以避免分组哈希),所以我想增加此步骤接收的内存量。

假设我的查询收到了5GB的预算。 5GB如何在查询步骤中分布?

我找不到任何文件。

query-optimization vertica
1个回答
1
投票

看看EXECUTION_ENGINE_PROFILES表。

使用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增加查询预算

© www.soinside.com 2019 - 2024. All rights reserved.