Skip to main content

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

  1. Create workload groups with specific resource quotas (CPU, memory, concurrency limits)
  2. Assign users to workload groups using ALTER USER
  3. 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

CommandDescription
CREATE WORKLOAD GROUPCreates a new workload group with resource quotas
ALTER WORKLOAD GROUPModifies workload group configuration
DROP WORKLOAD GROUPRemoves a workload group
RENAME WORKLOAD GROUPRenames a workload group

Information

CommandDescription
SHOW WORKLOAD GROUPSLists 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.

Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today