1 个回答
使用workload group的案例是:
#创建某个用户
create user 'test'@'%' IDENTIFIED BY 'test';
#给用户授权
grant SELECT_PRIV,LOAD_PRIV,CREATE_PRIV,ALTER_PRIV ON test.* TO test;
#在fe.conf中配置如下项,并重启
experimental_enable_workload_group=true
#在执行环境开启pipline
set experimental_enable_pipeline_engine = true;
#创建workload group
create workload group if not exists test_query
properties (
"cpu_share"="10",
"memory_limit"="10%",
"enable_memory_overcommit"="true",
"max_concurrency" = "1",
"max_queue_size" = "2",
"queue_timeout" = "3000"
);
#给用户赋予group权限
GRANT USAGE_PRIV ON WORKLOAD GROUP 'test_query' TO 'test'@'%';
#登录当前用户
mysql -utest -h127.0.0.1 -P9030 -ptest
#设置group环境变量
set property 'default_workload_group'='test_query';
#执行并发查询
select * from test;
发布于:7个月前 (02-19) IP属地:未知
我来回答
您需要 登录 后回答此问题!