Hi,
Thnx in advance if anyone help me with this.
I am trying to compare the execution times of RDBMS and Neo4j Queries, how can I get the execution time in Neo4j.
If you have enterprise edition, you can turn on query logging, and if you like you can also enable additional options to track how the time is distributed throughout the execution process.
Keep in mind that at least the first run of the query may be slower than subsequent runs, as the query will have to be planned, and the part of the graph touched may not be in the pagecache. We recommend discarding the first execution time, then running the query a few times to get the min or average, depending on what you're going for.
Also you'll want to make sure you have indexes (or unique constraints) in place to support fast lookup of your starting nodes.
In neo4j, there are two options to choose from when you want to analyze a query. It is explain and profile. I think you should take a look at those links:
https://neo4j.com/docs/cypher-manual/current/query-tuning/how-do-i-profile-a-query/
to determine the execution time of a query in neo4j.
Query logging page url: Logging - Operations Manual
BTW, there are lots of tricks/techniques to optimize Cypher Queries.
See:
Hello mates
I'm trying to find the execution time of GDS algorithms using community edition of Neo4j. Is there any way to find it rather than query logging? Since this facility is specific to enterprise edition as shown in this topic.
I found this site [neo4j - How to get the execution time of a cypher query from python? - Stack Overflow] is it helpful ??
Update:
Can I rely on this to estimates query execution time?
Note: this is an example of executing shortest path algorithm: