Cardinality estimation for property graph queries with gated learning approach on the graph database
Zhenzhen He,Jiong Yu,Xusheng Du,Binglei Guo,Ziyang Li,Zhe Li
DOI: https://doi.org/10.1007/s11042-024-19215-7
IF: 2.577
2024-05-08
Multimedia Tools and Applications
Abstract:With the increasing complexity of graph query processing tasks, it is difficult for users to obtain the accurate cardinality before or during the execution of query tasks. Accurate estimate query cardinality is crucial for property graph data model, which usually involves entities, multiple joins, and various types of properties (key-value pairs). While learning-based approaches have been used in query optimization, estimating the cardinality of property graph queries is still particularly challenging. In this paper, we first formally represent each property graph query and then divide the estimation process into three phases: query execution, training data generation, and model training. Secondly, we construct a data pool to deal the updating query workloads in the training data generation phase. Thirdly, we utilize the gate mechanism to develop a cardinality estimation framework based on deep learning neural networks for property graph queries in the Neo4j database, and we propose a hybrid loss function to optimize the training process. Finally, we adopt a method of pre-aggregating the underlying data to speed up query execution in the first phase. The result of the experiment on two real-world datasets shows that our optimized methods can effectively improve the estimation accuracy of the deep learning model, and our query estimator outperforms other deep learning models compared in terms of estimation accuracy.
computer science, information systems, theory & methods,engineering, electrical & electronic, software engineering