{"title":"建立一个融合关系图优化框架","authors":"Yunkai Lou, Longbin Lai, Bingqing Lyu, Yufan Yang, Xiaoli Zhou, Wenyuan Yu, Ying Zhang, Jingren Zhou","doi":"arxiv-2408.13480","DOIUrl":null,"url":null,"abstract":"The recent ISO SQL:2023 standard adopts SQL/PGQ (Property Graph Queries),\nfacilitating graph-like querying within relational databases. This advancement,\nhowever, underscores a significant gap in how to effectively optimize SQL/PGQ\nqueries within relational database systems. To address this gap, we extend the\nfoundational SPJ(Select-Project-Join) queries to SPJM queries, which include an\nadditional matching operator for representing graph pattern matching in\nSQL/PGQ. Although SPJM queries can be converted to SPJ queries and optimized\nusing existing relational query optimizers, our analysis shows that such a\ngraph-agnostic method fails to benefit from graph-specific optimization\ntechniques found in the literature. To address this issue, we develop a\nconverged relational-graph optimization framework called RelGo for optimizing\nSPJM queries, leveraging joint efforts from both relational and graph query\noptimizations. Using DuckDB as the underlying relational execution engine, our\nexperiments show that RelGo can generate efficient execution plans for SPJM\nqueries. On well-established benchmarks, these plans exhibit an average speedup\nof 21.90$\\times$ compared to those produced by the graph-agnostic optimizer.","PeriodicalId":501123,"journal":{"name":"arXiv - CS - Databases","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2024-08-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Towards a Converged Relational-Graph Optimization Framework\",\"authors\":\"Yunkai Lou, Longbin Lai, Bingqing Lyu, Yufan Yang, Xiaoli Zhou, Wenyuan Yu, Ying Zhang, Jingren Zhou\",\"doi\":\"arxiv-2408.13480\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"The recent ISO SQL:2023 standard adopts SQL/PGQ (Property Graph Queries),\\nfacilitating graph-like querying within relational databases. This advancement,\\nhowever, underscores a significant gap in how to effectively optimize SQL/PGQ\\nqueries within relational database systems. To address this gap, we extend the\\nfoundational SPJ(Select-Project-Join) queries to SPJM queries, which include an\\nadditional matching operator for representing graph pattern matching in\\nSQL/PGQ. Although SPJM queries can be converted to SPJ queries and optimized\\nusing existing relational query optimizers, our analysis shows that such a\\ngraph-agnostic method fails to benefit from graph-specific optimization\\ntechniques found in the literature. To address this issue, we develop a\\nconverged relational-graph optimization framework called RelGo for optimizing\\nSPJM queries, leveraging joint efforts from both relational and graph query\\noptimizations. Using DuckDB as the underlying relational execution engine, our\\nexperiments show that RelGo can generate efficient execution plans for SPJM\\nqueries. On well-established benchmarks, these plans exhibit an average speedup\\nof 21.90$\\\\times$ compared to those produced by the graph-agnostic optimizer.\",\"PeriodicalId\":501123,\"journal\":{\"name\":\"arXiv - CS - Databases\",\"volume\":null,\"pages\":null},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-08-24\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"arXiv - CS - Databases\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/arxiv-2408.13480\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Databases","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2408.13480","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Towards a Converged Relational-Graph Optimization Framework
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.90$\times$ compared to those produced by the graph-agnostic optimizer.