SelectDB Enterprise
参考手册
SQL 语句
集群管理
计算资源管理
SHOW WORKLOAD GROUPS

SHOW WORKLOAD GROUPS

描述

该语句用于展示当前用户具有 usage_priv 权限的资源组。

语法

SHOW WORKLOAD GROUPS [LIKE "<pattern>"];

注意事项

该语句仅做资源组简单展示,更复杂的展示可参考 tvf workload_groups().

示例

  1. 展示所有资源组:

    mysql> show workload groups;
    +----------+--------+--------------------------+---------+
    | Id       | Name   | Item                     | Value   |
    +----------+--------+--------------------------+---------+
    | 10343386 | normal | cpu_share                | 10      |
    | 10343386 | normal | memory_limit             | 30%     |
    | 10343386 | normal | enable_memory_overcommit | true    |
    | 10352416 | g1     | memory_limit             | 20%     |
    | 10352416 | g1     | cpu_share                | 10      |
    +----------+--------+--------------------------+---------+
  2. 使用 LIKE 模糊匹配:

    mysql> show workload groups like "normal%"
    +----------+--------+--------------------------+---------+
    | Id       | Name   | Item                     | Value   |
    +----------+--------+--------------------------+---------+
    | 10343386 | normal | cpu_share                | 10      |
    | 10343386 | normal | memory_limit             | 30%     |
    | 10343386 | normal | enable_memory_overcommit | true    |
    +----------+--------+--------------------------+---------+
© 2025 北京飞轮数据科技有限公司 京ICP备2022004029号 | Apache、Apache Doris 以及相关开源项目名称均为 Apache 基金会商标