Commands for Tenant Management
This section describes the basic syntax and usage of SQL statements for tenant management.
- Add a tenant.create workload group if not exists test_group properties ("cpu_share"="10","memory_limit"="30%","enable_memory_overcommit"="true","max_concurrency" = "10","max_queue_size" = "20","queue_timeout" = "3000");
- Modify a tenant.alter workload group test_group properties ('cpu_share'='20','memory_limit'='4%','enable_memory_overcommit'='true','max_concurrency'='15','max_queue_size'='25','queue_timeout'='4000');
- Bind a user to a tenant: Bind a user to a workload group by setting user property. The default value is normal.set property for doris_user 'default_workload_group' = 'test_group';
- Query the tenant to which the user belongs.show property for user_name like 'default_workload_group';
- Grant permissions to the user bound to the tenant.GRANT USAGE_PRIV ON WORKLOAD GROUP 'test_group' TO 'jack';
- Revoke the permissions of the old tenant.revoke USAGE_PRIV ON WORKLOAD GROUP 'test_group' from 'jack';
- View tenants.select * from information_schema.workload_groups;
- Delete a tenant.mysql> DROP WORKLOAD GROUP if exists 'test_group';Query OK, 0 rows affected (0.01 sec)
Parent topic: Configuring a Doris Tenant