SelectDB Cloud
SQL 手册
SQL 语句
Show
SHOW-WORKLOAD-GROUPS

SHOW-WORKLOAD-GROUPS

Name

SHOW WORKLOAD GROUPS

Description

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

语法:

SHOW WORKLOAD GROUPS [LIKE "pattern"];

说明:

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

Example

  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    |
    +----------+--------+--------------------------+---------+

Keywords

SHOW, WORKLOAD, GROUPS, GROUP

Best Practice

© 2023 北京飞轮数据科技有限公司 京ICP备2022004029号 | Apache、Apache Doris 以及相关开源项目名称均为 Apache 基金会商标