arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.17786cs.DBcs.PF
收藏

一种模块化的图原生查询优化框架

A Modular Graph-Native Query Optimization Framework

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

AI总结:

针对现有复杂图模式查询系统单体架构的局限,提出模块化图原生查询优化框架GOpt,支持多查询语言、与图系统解耦并集成高级优化技术,实验验证其可显著提升Neo4j和GraphScope的查询性能。

摘要:

结合模式匹配与关系操作的复杂图模式(Complex Graph Patterns, CGPs)在实际应用中被广泛使用。现有系统针对CGPs采用单体架构,限制了其集成多种查询语言的能力,且缺乏部分高级优化技术。因此,为解决这些问题,我们提出GOpt——一种模块化的图原生查询优化框架,具备以下特性:(1)支持多种查询语言的查询;(2)将执行与特定图系统解耦;(3)集成高级优化技术。具体而言,GOpt提供了高层接口GraphIrBuilder,用于将来自不同图查询语言的查询转换为统一中间表示(GIR),从而简化优化流程;它还提供了底层接口PhysicalSpec,使后端能够注册后端特定的物理算子和代价模型。此外,GOpt采用了图原生优化器,包含丰富的启发式规则、自动类型推断方法,以及为CGPs定制的基于代价的优化技术。综合实验表明,集成GOpt可显著提升性能:在真实数据集上,Neo4j实现了9.2倍的平均加速比(最高达48.6倍),GraphScope实现了33.4倍的平均加速比(最高达78.7倍)。

英文摘要:

Complex Graph Patterns (CGPs), which combine pattern matching with relational operations, are widely used in real-world applications. Existing systems rely on monolithic architectures for CGPs, which restrict their ability to integrate multiple query languages and lack certain advanced optimization techniques. Therefore, to address these issues, we introduce GOpt, a modular graph-native query optimization framework with the following features: (1) support for queries in multiple query languages, (2) decoupling execution from specific graph systems, and (3) integration of advanced optimization techniques. Specifically, GOpt offers a high-level interface, GraphIrBuilder, for converting queries from various graph query languages into a unified intermediate representation (GIR), thereby streamlining the optimization process. It also provides a low-level interface, PhysicalSpec, enabling backends to register backend-specific physical operators and cost models. Moreover, GOpt employs a graph-native optimizer that encompasses extensive heuristic rules, an automatic type inference approach, and cost-based optimization techniques tailored for CGPs. Comprehensive experiments show that integrating GOpt significantly boosts performance, with Neo4j achieving an average speedup of 9.2 times (up to 48.6 times), and GraphsScope achieving an average speedup of 33.4 times (up to 78.7 times), on real-world datasets.

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

↑