Performance
- Use parameters instead of literals when possible. This allows Cypher to re-use your queries instead of having to parse and build new execution plans.
- Always set an upper limit for your variable length patterns. Itâs possible to have a query go wild and touch all nodes in a graph by mistake.
- Return only the data you need. Avoid returning whole nodes and relationshipsâââinstead, pick the data you need and return only that.
- Use
PROFILE
/EXPLAIN
to analyze the performance of your queries. See Query Tuning for more information on these and other topics, such as planner hints.
Comments