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

关系数据库系统中高效路径查询处理

Efficient Path Query Processing in Relational Database Systems

Northeastern University(东北大学)

Diego Rivera Correa, Mirek Riedewald

AI总结:

本文提出ReCAP抽象,通过显式指定早期过滤机会,使关系型数据库能高效处理结合正则表达式和属性约束的路径查询,提升性能达数万倍。

摘要:

路径查询在属性图中至关重要,近年来越来越多的研究关注结合标签上的正则表达式与顶点和边属性值约束的查询。高效评估此类通用路径查询需要在无法完成完整结果路径时尽早消除中间结果。目前最先进的图数据库管理系统(SOA)和关系数据库管理系统都无法有效处理大量查询。我们表明,通过在查询中显式指定早期过滤机会,可以给关系优化器“一点帮助”,从而解决此问题。为此,我们提出了ReCAP抽象,它大大简化了实现早期过滤技术的实施,无论约束多么复杂,只需实现(1)一种NFA式状态转移函数和(2)少量与用户定义聚合所需函数相似的函数。我们证明,当使用ReCAP时,标准的关系数据库管理系统如DuckDB可以有效地将属性约束推入查询计划中,在多种查询和输入图上,其性能比SOA图和关系数据库管理系统高出多达40万倍。

英文摘要:

Path queries are crucial for property graphs, and there is growing interest in queries that combine regular expressions over labels with constraints on property values of vertices and edges. Efficient evaluation of such general path queries requires that intermediate results be eliminated early when there is no possible completion to a full result path. Neither state-of-the-art (SOA) graph DBMS nor relational DBMS currently can do this effectively for a large class of queries. We show that this problem can be addressed by giving a relational optimizer ``a little help'' by specifying early filtering opportunities explicitly in the query. To this end, we propose ReCAP, an abstraction that greatly simplifies the implementation of early filtering techniques for any type of property constraint for which such early filtering can be derived. No matter how complex the constraint, one only needs to implement (1) an NFA-style state transition function and (2) a handful of functions that mirror those needed for user-defined aggregates. We show that when using ReCAP, a standard relational DBMS like DuckDB can effectively push property constraints deep into the query plan, beating the SOA graph and relational DBMS by a factor up to 400,000 over a variety of queries and input graphs.

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

↑