如何在redshift中检查当前的Queue插槽并发级别

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

我需要知道特定redshift用户的redshift Queue配置中的当前插槽计数值。 Redshift中是否有任何系统表提供此用户级信息。

amazon-redshift
1个回答
0
投票

您可以在“WLM系统表和视图”http://docs.aws.amazon.com/redshift/latest/dg/cm-c-wlm-system-tables-and-views.html中找到内部表的列表

此查询总结了一些事情:

SELECT
      wlm.service_class                      queue
    , TRIM( wlm.name )                       queue_name
    , LISTAGG( TRIM( cnd.condition ), ', ' ) condition
    , wlm.num_query_tasks                    query_concurrency
    , wlm.query_working_mem                  per_query_memory_mb
    , ROUND(((wlm.num_query_tasks * wlm.query_working_mem)::NUMERIC / mem.total_mem::NUMERIC) * 100, 0)::INT  cluster_memory_pct
    , wlm.max_execution_time
    , wlm.user_group_wild_card
    , wlm.query_group_wild_card
FROM stv_wlm_service_class_config wlm
JOIN stv_wlm_classification_config cnd ON wlm.service_class = cnd.action_service_class
CROSS JOIN (SELECT SUM( num_query_tasks * query_working_mem ) total_mem
            FROM pg_catalog.stv_wlm_service_class_config
            WHERE service_class > 5) mem
WHERE wlm.service_class > 5
GROUP BY wlm.service_class, TRIM( wlm.name ), wlm.num_query_tasks, wlm.query_working_mem, mem.total_mem,
    wlm.max_execution_time, wlm.user_group_wild_card, wlm.query_group_wild_card
ORDER BY 1
;

产量

 queue |    queue_name    |    condition     | query_concurrency | per_query_memory_mb | cluster_memory_pct | max_execution_time | user_group_wild_card | query_group_wild_card
-------+------------------+------------------+-------------------+---------------------+--------------------+--------------------+----------------------+-----------------------
     6 | Service class #1 | (querytype: any) |                 5 |                1208 |                100 |                  0 | false                | false
(1 row)
© www.soinside.com 2019 - 2024. All rights reserved.