基于MPP架构的并行空间数据库原型系统的设计与实现
陈达伦, 陈荣国, 谢炯

Research of the Parallel Spatial Database Proto System Based on MPP Architecture
CHEN Dalun,CHEN Rongguo,XIE Jiong
表1 非分区多表并行连接算法
Tab. 1 Algorithm for joining un-partitioned multi-tables
算法:非分区列多表并行连接
步骤1 select A.name, A.shape from A
For i=1 to Count_node(从节点数)
将表A的查询的投影列(A.name)、连接列(几何列A.shape)发送至协调者。其中,空间列以二进制BLOB对象的形式传输
end for
步骤2 create temp table tmp1(name char(20),shape st_geometry )
协调者节点将结果集打包,生成临时结果集TDR
For i=1 to Count_node(从节点数)
在各个节点上创建临时表TempA*,以及临时空间索引批量插入临时结果集TDR到各个节点的临时表
end for
步骤3 select ta.name, B.name,st_astext( ta.shape) from TempA* as ta,B where st_within(ta.shape = B.shape)=1
For i= 1 to P do(并行地)
对于各个节点,将临时表TempA*与表B进行连接操作,将结果集发送到协调者节点上
对于空间列进行st_astext数据类型转换
end for
协调者归并结果集
步骤4 协调者执行查询计划中的下一步骤(归并数据进行下一个表的连接或格式化输出至客户端)