clem
(Clem)
January 7, 2021, 7:40pm
2
There's a few of threads on optimization:
Happy to report I may have solved the issue!
To limit the siblings that get searched for reserved = false, I set up a subquery in the CALL block.
CALL {
MATCH (origin { type: 'part', identifier: '182' })<-[:CHILD]-(parent)-[:CHILD]->(siblings)
RETURN siblings
}
WITH siblings
WHERE siblings.reserved = false
RETURN siblings
The query planner shows this searching about ~475 nodes for the boolean attribute, instead of ~50,000.
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?
Definitely learn about EXPLAIN and PROFILE (which I suspect you already are familiar with since they are in other DBs.)
Since the code is open source, you could always see how Neo4J implements its query optimizations.
Good luck with your PhD!