英文:
Is there a performance difference between using Cypher and java API in Galaxybase?
问题
在使用Galaxybase时,对于相对较小的数据量,使用Cypher和Java API没有明显的性能差异。
英文:
I am new to Galaxybase and use Galaxybase with a relatively small amount of data, and there is no significant difference when using the Cypher and Java APIs.
Is there any actual difference in performance between Cypher and java API?
答案1
得分: 0
是的,存在差异。Cypher查询是为了与neo4j兼容而支持的。Cypher语法本身的限制可能导致某些情况下查询效率低下。
例如,它的(point)-[edge]-(point)
表达方式自然地匹配了深度优先搜索(DFS)的方法,而不适用于广度优先搜索(BFS)的方法。在许多图遍历查询应用场景中,如果使用DFS方式,将导致大量重复迭代访问,效率不高。
我们特别为BFS遍历查询提供了Java API接口中的bfsMaster方法,速度可以大大提高。
英文:
Yes, there are differences. Cypher queries are supported for the purpose of compatibility with neo4j. The limitations of Cypher syntax itself can lead to inefficient queries in some cases.
For example, its (point)-[edge]-(point)
formulation naturally matches the dfs traversal approach, and is not applicable to the bfs traversal approach. Many graph traversal query application scenarios, if you use the dfs way will cause a lot of repeated iterative access, and not very efficient.
We specifically provide the bfsMaster method in the java api interface for bfs traversal queries, the speed can be much higher.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论