返回首页

gbase数据、南大通用产品文档:GBase8a实现步骤

更新日期:2024年09月11日

步骤1 创建资源消费组并关联用户
create consumer group group_high
comment = 'users for high';
create consumer group group_low
comment = 'users for low';
alter consumer group group_high
add user usera;
alter consumer group group_low
add user userb;
步骤2 创建资源池
create resource pool static_pool_high(
cpu_percent=90,
max_memory=10000,
max_temp_diskspace= 10000,
max_disk_space= 10000,
max_disk_writeio=1000,
max_disk_readio=1000) TYPE static;
create resource pool static_pool_low(
cpu_percent=10,
max_memory=10000,
max_temp_diskspace= 10000,
max_disk_space= 10000,
max_disk_writeio=1000,
max_disk_readio=1000) TYPE static;
create resource pool pool_high(
priority=1,
cpu_percent=100,
max_memory=4000,
max_temp_diskspace=50000,
max_disk_space=50000,

GBase 8a MPP Cluster 产品手册
4 管理员指南
文档版本953(2022-09-15)
南大通用数据技术股份有限公司
516
max_disk_writeio=600,
max_disk_readio=600,
max_activetask=200,
task_max_parallel_degree=100,
task_waiting_timeout=100000,
task_running_timeout=100000)
type dynamic base on static_pool_high;
create resource pool pool_low(
priority=1,
cpu_percent=100,
max_memory=4000,
max_temp_diskspace=50000,
max_disk_space=50000,
max_disk_writeio=600,
max_disk_readio=600,
max_activetask=200,
task_max_parallel_degree=100,
task_waiting_timeout=100000,
task_running_timeout=100000)
type dynamic base on static_pool_low;
步骤3 创建资源计划
create resource plan
resource_plan
comment = 'resource plan';
步骤4 创建资源指令计划
create resource directive directive1
(plan_name = 'resource_plan',
pool_name = 'pool_high',
group_name = 'group_high',
comment = 'high user resource usage ');
create resource directive directive2
(plan_name = 'resource_plan',
pool_name = 'pool_low',
group_name = 'group_low',

GBase 8a MPP Cluster 产品手册
4 管理员指南
文档版本953(2022-09-15)
南大通用数据技术股份有限公司
517
comment = 'low user resource usage ');
步骤5 激活计划
active resource plan resource_plan on vc vc1;
注意

由于RH6.x/SUSE11 等低版本的操作系统存在内核缺陷,可能会导致大负载的情况下,
操作系统宕机。

建议在RH7.3/SUSE12 以上版本的操作系统中使用多静态资源池控制。

manager 表的 projects 列是嵌套集合(请参阅图 1)。对嵌套集合类型的查询返回特定集合
包含的所有元素。
下列查询显示返回 projects 列的特定行中所有元素的查询。
WHERE 子句
将查询限制为单个行,在其中,mgr_name 列中的值是 Sayles。
图: 查询
SELECT projects
FROM manager
WHERE mgr_name = 'Sayles'
查询结果显示 manager 表的单个行的 project 列集合。查询返回管理 Sayles 描述的那些项目
的名称。对于 LIST 中的每个元素,集合包含项目名(pro_name)和指定给每个项目的成
员(pro_members)的 SET 。
图: 查询结果
projects LIST {ROW(voyager_project, SET{Simonian, Waters, Adams, Davis})}

projects LIST {ROW(horizon_project, SET{Freeman, Jacobs, Walker,
Cannan})}

projects LIST {ROW(sapphire_project, SET{Villers, Reeves, Doyle,
Strongin})}

IDSSECURITYLABEL 类型将安全标号存储在受基于标号的访问控制 (LBAC) 安全
策略保护的表中。
只有具有 DBSECADM 角色的用户才能创建、改变或删除此数据类型的列。
IDSSECURITYLABEL 是内置的 DISTINCT OF VARCHAR(128) 数据类型。 具有安全策略的表
可以只有一个 IDSSECURITYLABEL 列。 不具有安全策略的表可以没有该列。不能在类型为
IDSSECURITYLABEL 的列中对安全标号进行加密。