Workload Group
Workload groups enable resource management and query concurrency control in Databend by allocating CPU, memory quotas and limiting concurrent queries for different user groups.
How It Works
- Create workload groups with specific resource quotas (CPU, memory, concurrency limits)
- Assign users to workload groups using
ALTER USER
- Query execution automatically applies the workload group's resource limits based on the user
Quick Example
-- Create workload group
CREATE WORKLOAD GROUP analytics WITH cpu_quota = '50%', memory_quota = '30%', max_concurrency = 5;
-- Assign user to workload group
CREATE USER analyst IDENTIFIED BY 'password';
ALTER USER analyst WITH SET WORKLOAD GROUP = 'analytics';
Command Reference
Management
Command | Description |
---|---|
CREATE WORKLOAD GROUP | Creates a new workload group with resource quotas |
ALTER WORKLOAD GROUP | Modifies workload group configuration |
DROP WORKLOAD GROUP | Removes a workload group |
RENAME WORKLOAD GROUP | Renames a workload group |
Information
Command | Description |
---|---|
SHOW WORKLOAD GROUPS | Lists all workload groups and their settings |
tip
Resource quotas are normalized across all workload groups in a warehouse. For example, if two groups have 60% and 40% CPU quotas, they get 60% and 40% of actual resources respectively.