🤖 AI Summary
SQL/PGQ standards enable hybrid relational and graph query processing, yet experiments reveal substantial performance disparities—even for semantically equivalent SQL and PGQ queries—due to syntax-driven, model-isolated optimization in existing systems, lacking cross-model synergy. This paper proposes the first holistic unified optimization framework that transcends syntactic boundaries between SQL and PGQ, instead leveraging query semantics and data characteristics to automatically select optimal execution strategies. Key technical innovations include: (i) cross-model query normalization via equivalence-aware analysis; (ii) cost-aware operator fusion; and (iii) adaptive execution plan generation. Experimental evaluation demonstrates that the framework significantly narrows performance gaps among functionally identical queries, achieving an average 3.2× speedup. It thus provides critical enabling technology for efficient, standardized SQL/PGQ deployment.
📝 Abstract
SQL/PGQ is a new standard that integrates graph querying into relational systems, allowing users to freely switch between graph patterns and SQL. Our experiments show performance gaps between these models, as queries written in both formalisms can exhibit varying performance depending on the formalism used, suggesting that current approaches handle each query type separately, applying distinct optimizations to each formalism. We argue that a holistic optimization is necessary, where the system internally decides on the best algorithms regardless of whether queries are written in SQL or as graph patterns. We propose possible future research direction to unify these optimizations and mitigate performance gaps.