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.
翻译:在高度互联的数据领域中,图数据库正受到越来越多的关注,对大数据高效查询的需求也日益增长。我们注意到图数据库查询中存在重复的模式,这些模式的结果可以先存储为物化视图,从而加快查询速率。因此,我们提出了面向属性图的物化视图,包括视图创建、视图维护以及利用视图进行查询优化三个部分,并首次提出了一种适用于包含可变长度边的高效模板化视图维护方法,该方法可应用于多种图数据库。为了验证物化视图的效果,我们在TuGraph上进行了原型实现,并在TuGraph和Neo4j上进行了实验。实验结果表明,我们对读语句的查询优化效果远高于写语句带来的额外视图维护开销。整体工作负载的加速比最高可达28.71倍,单个查询的加速比最高可达近100倍。