MV4PG: Materialized Views for Property Graphs
Chaijun Xu, Xingdi Wei, Yu Zhang, Kaiwei Li, Xiaowei Zhu, Ke Huang, Tao Wang, Shipeng Qi
TL;DR
MV4PG tackles slow query performance in graph databases by introducing materialized views for property graphs with a focus on variable-length edges. It combines three components—view creation, templated view maintenance, and query optimization using views—coupled with a VF2-like view matcher to integrate precomputed patterns into execution plans. The approach is validated on TuGraph and Neo4j with substantial gains: up to $28.71\times$ overall workload speedups and near $100\times$ for some single queries, while keeping maintenance overhead reasonable. The work demonstrates a practical pathway to speed up complex graph workloads and outlines concrete directions for automatic view selection and optimized maintenance strategies.
Abstract
Graph databases are getting more and more attention in the highly interconnected data domain, and the demand for efficient querying of big data is increasing. We noticed that there are duplicate patterns in graph database queries, and the results of these patterns can be stored as materialized views first, which can speed up the query rate. So we propose materialized views on property graphs, including three parts: view creation, view maintenance, and query optimization using views, and we propose for the first time an efficient templated view maintenance method for containing variable-length edges, which can be applied to multiple graph databases. In order to verify the effect of materialized views, we prototype on TuGraph and experiment on both TuGraph and Neo4j. The experiment results show that our query optimization on read statements is much higher than the additional view maintenance cost brought by write statements. The speedup ratio of the whole workload reaches up to 28.71x, and the speedup ratio of a single query reaches up to nearly 100x.
