数据仓库服务 GAUSSDB(DWS)-query_band负载识别:示例

时间:2024-07-01 10:52:16

示例

  1. 设置query_band“JobName=abc”关联资源池p1、队列内优先级Rush、次序为1。

    1
    2
    3
    4
    5
    SELECT * FROM gs_wlm_set_queryband_action('JobName=abc','respool=p1;priority=rush',1);
    gs_wlm_set_queryband_action
    -----------------------------
     t
    (1 row)
    

  2. 修改query_band“JobName=abc”的关联资源池为p2。

    1
    2
    3
    4
    5
    SELECT * FROM gs_wlm_set_queryband_action('JobName=abc','respool=p2');
    gs_wlm_set_queryband_action
    -----------------------------
     t
    (1 row)
    

  3. 修改query_band“JobName=abc”的队列内优先级为High。

    1
    2
    3
    4
    5
    SELECT * FROM gs_wlm_set_queryband_action('JobName=abc','priority=high');
    gs_wlm_set_queryband_action
    -----------------------------
     t
    (1 row)
    

  4. 修改query_band“JobName=abc”的次序为3。

    1
    2
    3
    4
    5
    SELECT * FROM gs_wlm_set_queryband_order('JobName=abc',3);
    gs_wlm_set_queryband_order
    -----------------------------
     t
    (1 row)
    

  5. 查询query_band关联的负载行为。

    1
    2
    3
    4
    5
    6
    SELECT * FROM pg_queryband_action;
        qband     | respool_id | respool | priority | qborder
    --------------+------------+---------+----------+---------
     AppName=test |      16974 | p1      | low      |      -1
     JobName=abc  |      17119 | p2      | high     |       1
    (2 rows)
    

support.huaweicloud.com/performance-dws/dws_10_0065.html