What should I do if my Cypher query is slower than expected, or uses more memory or CPU than I have?
I'm running my queries with Neo4j Browser, copied from my application.
What should I do? Are there any good practices / pointers?
What should I do if my Cypher query is slower than expected, or uses more memory or CPU than I have?
I'm running my queries with Neo4j Browser, copied from my application.
What should I do? Are there any good practices / pointers?
There are a number of things you can do:
Share your queries and query plans (download and share the PNG) in this Cypher category. Then others can help you.
It is also helpful to share your data-model and other statistics, and also the actual Cypher query.
There are already a number of performance related knowledge base posts available.
You can learn more here:
Cheers, Michael
Here's an interesting trick to optimize a query. It involves manually breaking up the query into two parts and forcing the part that winnows down the results be executed first returning a small result, and then executing a potentially slow query on the resulting small set.
Here's a useful item on Relationships or Relationship Properties;
http://www.dominickumar.com/blog/neo4j-relationship-modelling-performance/
Awesome, thats how traversing with index free adjacency.
Just a small thought, even with having property on relationship along with manual index on relationship property (by using **CALL db.index.fulltext.createRelationshipIndex)
could you co-relate the performance metrics