Author Login Chief Editor Login Reviewer Login Editor Login Remote Office

Computer Engineering ›› 2026, Vol. 52 ›› Issue (9): 388-401. doi: 10.19678/j.issn.1000-3428.0252206

• High-Performance Computing and Big Data • Previous Articles     Next Articles

Distributed Table Joining Optimization Method Based on Lattice Structure

SHANG Wen1, YOU Jinguo1,2,*(), WU Kang1, FU Wanting1, LI Xiaowu1, JIA Lianyin1,2   

  1. 1. Faculty of Information Engineering and Automation, Kunming University of Science and Technology, Kunming 650500, Yunnan, China
    2. Yunnan Key Laboratory of Artificial Intelligence, Kunming 650500, Yunnan, China
  • Received:2025-03-07 Revised:2025-05-27 Online:2026-09-15 Published:2025-07-03
  • Contact: YOU Jinguo

基于格结构的分布式表连接优化方法

尚文1, 游进国1,2,*(), 吴康1, 付琬婷1, 李晓武1, 贾连印1,2   

  1. 1. 昆明理工大学信息工程与自动化学院, 云南 昆明 650500
    2. 云南省人工智能重点实验室, 云南 昆明 650500
  • 通讯作者: 游进国
  • 作者简介:

    尚文(CCF学生会员), 男, 硕士研究生, 主研方向为数据库、数据仓库与数据挖掘

    游进国(CCF杰出会员、通信作者), 教授、博士

    吴康(CCF学生会员), 硕士研究生

    付琬婷(CCF学生会员), 硕士研究生

    李晓武, 讲师、博士

    贾连印(CCF会员), 教授、博士

  • 基金资助:
    国家自然科学基金(62462042); 国家自然科学基金(62062046)

Abstract:

In distributed computing frameworks, inefficient data transfer in the Shuffle phase has become a key bottleneck in data connectivity. Existing methods have certain limitations in dealing with table joins, such as broadcast joins and Hash joins in Spark are both susceptible to data skewing, which makes the load between nodes unbalanced. Aiming at this problem, the paper focuses on joining aggregated queries, and proposes a table joining method based on lattice structure: by precomputing the storage table partition data in the form of lattice structure, and utilizing the convex set property of equivalence class, i.e., the data cells containing the upper bound of equivalence class and contained by the lower bound of equivalence class, whose aggregation values are equal to the aggregation values of equivalence class, so as to realize the quick matching and calculation. Since the query data cells as a compressed form of basic table data, the data size and skew are more concise and uniform, the article uses the query data cells instead of table data to perform data transfer and connection, which greatly reduces the data Shuffle and computational complexity. The method proposed in the paper has been implemented in Spark, and experiments based on the TPC-H dataset show that: the method of the paper reduces the data Shuffle by about 45.06% in large dataset scenarios, meanwhile, the workload among the nodes is more balanced compared to the benchmark method, and the query response time is shortened by 14.23% on average.

Key words: Spark, join query, equivalence class, lattice structure, data Shuffle

摘要:

在分布式计算框架中, Shuffle阶段的数据传输效率较低已成为数据连接的关键瓶颈。现有方法在处理表连接时存在一定的局限性, 如Spark中的广播连接和哈希连接均易受数据倾斜影响, 使得节点之间负载不均衡。针对此问题, 聚焦于连接聚集查询, 提出一种基于格结构的表连接方法。通过预计算存储表分区数据为格结构形式, 利用等价类的凸集性质, 即包含等价类上界且被等价类下界所包含的数据单元, 其聚集值与等价类聚集值相等, 从而实现对查询语句所映射生成的查询单元进行快速匹配和计算。由于查询单元作为基本表数据的一种压缩形式, 数据大小和倾斜度更加简洁、均匀, 使用查询单元代替基本表数据执行数据的传输和连接, 极大程度地减少了Shuffle阶段的数据大小和计算复杂度。所提方法已在Spark中实现, 基于TPC-H数据集的实验结果表明, 所提方法在大数据集场景中减少数据Shuffle约45.06%, 同时, 节点间的工作负载相较于基准方法更加均衡, 查询响应时间平均缩短了14.23%。

关键词: Spark, 连接查询, 等价类, 格结构, 数据Shuffle