Neo4j query performance

What is the easiest way to gather performance of database in Neo4j?

Hello @anshulchaintha7 ,

You should make a list of the most important queries.

Then you should PROFILE there to observe db hits and elapsed time. Make sure that you execute each query at least twice as the first execution compiles the query.

You may need to:

  1. Rewrite your queries to make them more efficient.
  2. Add indexes to the graph.
  3. Refactor your graph which would require you to rewrite your queries.

Then there are things such a warming up to page cache to make sure as much of the graph is in memory as possible and also playing with the VM settings for the graph.

Take as look at the performance section of the Operations Manual.

1 Like

Hello @anshulchaintha7 :slight_smile:

You can also install Neo4j Ops Manager.

Best regards,
Cobra

1 Like

Thanks Elaine and Cobra.
Any monitoring tool for Neo4j community edition?

Not that I know of, unless another community member has written one.

Hello @cobra
Is there any workaround so that I can get time of query execution in ms?
As of now I am noting query time in integers as per desktop version.
I want to collect the exact time in decimals.

Hello @anshulchaintha7 :slight_smile:

If you use a Neo4j connector, you can get the timestamp before sending the query and after the result is returned then make a subtraction. For example, in Python you can use the time library to do it. This will give you a good approximation.

Best regards,
Cobra

1 Like