arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.13480cs.DB
收藏

迈向融合的关系-图优化框架

Towards a Converged Relational-Graph Optimization Framework

Yunkai Lou, Longbin Lai, Bingqing Lyu, Yufan Yang, Xiaoli Zhou, Wenyuan Yu, Ying Zhang, Jingren Zhou

AI总结:

本文针对 SQL/PGQ 查询优化空白,扩展 SPJ 为含图匹配算子的 SPJM,并提出融合关系与图优化的 RelGo 框架,在 DuckDB 上较图无关优化器平均加速 21.90 倍。

摘要:

最新的 ISO SQL:2023 标准采用了 SQL/PGQ(属性图查询),促进了在关系数据库内进行类图查询。然而,这一进展凸显出在关系数据库系统中如何有效优化 SQL/PGQ 查询方面存在显著空白。为弥补该空白,我们将基础的 SPJ(选择-投影-连接)查询扩展为 SPJM 查询,其中包含一个额外的匹配算子,用于表示 SQL/PGQ 中的图模式匹配。尽管 SPJM 查询可以转换为 SPJ 查询并使用现有关系查询优化器进行优化,但我们的分析表明,这种与图无关的方法无法受益于文献中已有的图专用优化技术。为解决这一问题,我们开发了一个名为 RelGo 的融合关系-图优化框架,用于优化 SPJM 查询,并利用关系查询优化与图查询优化的协同作用。实验以 DuckDB 作为底层关系执行引擎,结果表明 RelGo 能够为 SPJM 查询生成高效的执行计划。在成熟基准测试上,与图无关优化器生成的计划相比,这些计划平均实现了 21.90 倍的加速。

英文摘要:

The recent ISO SQL:2023 standard adopts SQL/PGQ (Property Graph Queries), facilitating graph-like querying within relational databases. This advancement, however, underscores a significant gap in how to effectively optimize SQL/PGQ queries within relational database systems. To address this gap, we extend the foundational SPJ (Select-Project-Join) queries to SPJM queries, which include an additional matching operator for representing graph pattern matching in SQL/PGQ. Although SPJM queries can be converted to SPJ queries and optimized using existing relational query optimizers, our analysis shows that such a graph-agnostic method fails to benefit from graph-specific optimization techniques found in the literature. To address this issue, we develop a converged relational-graph optimization framework called RelGo for optimizing SPJM queries, leveraging joint efforts from both relational and graph query optimizations. Using DuckDB as the underlying relational execution engine, our experiments show that RelGo can generate efficient execution plans for SPJM queries. On well-established benchmarks, these plans exhibit an average speedup of 21.90x compared to those produced by the graph-agnostic optimizer.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑