允许分布在不同Node Group中的表进行关联查询。包括基表扫描操作、关联操作、集合操作、聚集操作和增删改操作。
用户可通过GUC参数对计算Node Group进行调整,具体调整方式请参考expected_computing_nodegroup。
示例一:多Node Group关联使用
create node group ng1 with (dn_6001_6002, dn_6003_6004);
create node group ng2 with (dn_6005_6006, dn_6007_6008, dn_6009_6010);
create table t1 (a int, b int, c int, d int) to group ng1;
create table t2 (a int, b int, c int, d int) to group ng2;
select group_name from PGXC_GROUP;增删改操作
insert into t1 select * from t2;
delete from t1 using t2 where t1.b = t2.c;
update t1 set b = 1 from t2 where t1.c = t2.c;
select b from t1 where c=6;关联操作
select * from t1, t2 where t1.b = t2.c;集合操作
select * from t1 union all select * from t2;
select * from t1 intersect select * from t2;
select b, sum(c) from t1 group by b;
select t1.b, t2.b, avg(t1.c + t2.c) from t1, t2 where t1.d = t2.d group by t1.b, t2.b;
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69959250/viewspace-3165211/ ,如需转载,请注明出处,否则将追究法律责任。