Neo4J Java Native APIs vs Traversal APIs vs Cypher

前端 未结 1 394
执笔经年
执笔经年 2021-01-22 00:31

Has anyone done the performance evaluation for Neo4J Java Native APIs, Traversal APIs and Cypher. Which of the above three options will yield me better result from performance p

1条回答
  •  囚心锁ツ
    2021-01-22 01:17

    You'll be interested in this article. But the main takeaway from their tests is

    • The Core API is able to answer about 2000 friend of a friend queries (I have to admit on a very sparse network).
    • The Traverser framework is about 25% slower than the Core API
    • Worst is cypher which is slower at least one order of magnitude only able to answer about 100 FOAF like queries per second. I was shocked so I talked with Andres Taylor from neo4j who is mainly working for cypher. He asked my which neo4j version I used and I said it was 1.7. He told me I should check out 1.9. since Cypher has become more performant. So I run the benchmarks over neo4j 1.8 and neo4j 1.9 unfortunately Cypher became slower in newer neo4j releases.

    However, I would recommend using Cypher unless in a high performance situation. (Basically the harder it is to work with, the faster it can be. It is up to you to balance development effort with performance.) Also, this data is old, and each major update to Neo4j comes with new tricks the Cypher planner can use to query more efficiently. So Cypher performance will very based on DB content and Neo4j version (for better or worse)

    Also, the Traversal API is built on the Core API, and Cypher is built on the Traversal API; So anything you can do in Cypher, can be done with the other 2.

    0 讨论(0)
提交回复
热议问题