• Data Warehouse Service

dws
  1. Help Center
  2. Data Warehouse Service
  3. Developer Guide
  4. SQL Reference
  5. SQL Syntax
  6. ALTER WORKLOAD GROUP

ALTER WORKLOAD GROUP

Function

ALTER WORKLOAD GROUP modifies a workload group and sets the number of concurrent SQL statements.

Precautions

As long as the user has ALTER permission on the current database, the user can modify the workload group.

Syntax

ALTER WORKLOAD GROUP wg_name
     USING RESOURCE POOL pool_name [ WITH ( ACT_STATEMENTS = count ) ];

Parameter Description

  • wg_name

    Specifies the name of the workload group to be deleted.

    NOTE:

    A workload group must be unique in a database.

    Value range: A string. It must comply with the naming convention rule.

  • pool_name

    Specifies the name of the resource pool.

    Value range: A string that indicates an existing resource pool.

  • counts

    Specifies the number of concurrent SQL statements in the resource pool that the workload group belongs to.

    Value range: An integer ranging from -1 to INT_MAX.

Examples

-- Create the resource pool named pool1:
CREATE RESOURCE POOL pool1;

-- Create the workload group named group1:
CREATE WORKLOAD GROUP group1;

-- Change the maximum number of concurrent SQL statements in workload group group1 to 10. The workload group is associated with the resource pool pool1.
ALTER WORKLOAD GROUP group1 USING RESOURCE POOL pool1 WITH (ACT_STATEMENTS=10);

-- Delete workload group group1 and resource pool pool1:
DROP WORKLOAD GROUP group1;
DROP RESOURCE POOL pool1;