How can I optimize my Cypher Queries?

There are a number of things you can do:

  1. Run your query with PROFILE or EXPLAIN. In the resulting query plan there are indications of expensive operations.
  2. Make sure that lookup operations by id or value (numeric range, text search) run on fields that are indexed.
  3. 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:

Cheers, Michael

8 Likes
Better way to merge/match loading from csv
Import via http increasingly slow on a large dataset
Why its taking more time(4190ms) to get response while hitting from aws to server db,and taking only few milliseconds(615ms) from localhost to server db
Not able to restart neo4j Server which is in Cluster
How to use cypher import csv file and do merge commands using py2neo?
Connecting nodes to build flight path routines
Programaticaly referencing Neo4j to aws s3 bucket
Novice trying to import access database on Mac Os
Memory issues: Add new edge between nodes if there is a path of length k between them
Data cannot be queried after it was imported by neo4j-admin
How to use Node properties to set Relationship values instead of a constant HAS_A , IS_A thingy?
Creating date nodes by looping through a start date and an end date
Null connection from django_neomodel
Trying to connect to my Mongodb Atlas cluster 0 luck with the URL connect string!
Row's value with create
Unable to connect to localhost:7687
Neo4j Desktop Failing to Launch
Bloom License Requirement
Generate a graph database from my own csv files, not from a relational database
Connect Neo4j as Database in eclipse
Help with Link Prediction and Graph Design to Solve - Different Categories of Persons, Identifiers, and Works
Server Connect error
Failed to invoke procedure apoc.import.json caused by java.lang.nullpointerexception
Referencing graph in neo4j
Need help on how to export GDS treated dataset in python to run ML algorithms
Creating relationships while importing data
SET Property
Import from CSV: Null Error on Non Null Value
How to implement Custom Data Encryption/Decryption Functions/Procedures in apoc for Client Confidential Information
I have at least 4,000 "cypher" sentences to write into neo4j, it takes too many time. how can i be quick?
How to perform Machine learning graph CNN on my neo4j graph? I have constructed my graph using neo4j. I would like to see some demo or video links for performing the algorithm on the constructed graph. Can anyone through some valuable insights?
Gds 2.5.4 crashes neo4j desktop 1.5.9 on install and restart
Failed to write data to connection IPv4Address(('localhost', 18709)) (IPv6Address(('::1', 18709, 0, 0)))
Connect local dbms to the server on Neo4j Desktop
What is wrong with my query: Variable not defined
Trouble Accessing Neo4j Localhost via Docker Port Forwarding
Really weird: query not returning expected data after upgrade from 3.5.16 community to 3.5.19 enterprise
Neo4j startup enterprise license
Do we have any documentation on understanding output of :sysinfo command? I am trying to understand if storage size displayed is for the database in use
Data has been input by cmd, but I can't visualize it
Formatting new date time instances
Searching text from each record of MATCH output
Importing Movie data from example data set on neoj4
Crear una aplicacion en php o java para ingresar dos datos a la base de datos neo4j
Browser Connection lost and never connects until restart and again dead in few seconds
How to process heterogeneous data sources (structure, semi structure and unstructured) in Neo4Js using Ontology driven data integration? Any help /reference is highly appreciated