There are a number of things you can do:
- Run your query with PROFILE or EXPLAIN. In the resulting query plan there are indications of expensive operations.
- Make sure that lookup operations by id or value (numeric range, text search) run on fields that are indexed.
- If you are running updates make sure that your updates handle batches of about 10k-100k records, if you have more, please batch them.
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:
- 10 Cypher Tuning TIps GraphConnect Video
- 10 Cypher Tuning Tips Slides
- Very useful Cypher tips & tricks presentation video
- Query Tuning in Developer Manual
- Execution Plan Explanation Developer Manual
- Detailed Query Tuning Presentation
- Query Tuning Examples
- Batched Efficient Updates
- Efficient Loading of Subgraphs
Cheers, Michael