Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site migration is underway. Expect disruption to service on Thursday, Feb. 9!

Neo4j Query Log Analyzer and DB Analyzer Update - for Neo4j 4.0 with new Features


Neo4j Query Log Analyzer and DB Analyzer updated for Neo4j 4.0

With the release of Neo4j 4.0 my ‘Graph Apps’ for the Neo4j Desktop needed an update. The new Neo4j version, is a very big update with a lot of new features. An important feature is multi database where you can run more than one graph database on a Neo4j Server.

You can install both apps into Neo4j desktop from:


Query Log Analyzer 1.0.1

The first version of this tool as described here was able to analyze an uploaded query.log file. I also gave a presentation at NODES 2019

With this new version the following new features are added:

Multi Database

The Neo4j version 4 capability to run multiple databases leads to extra information in the query log file. You can now see in the query log on which database the query was executed. This will now be displayed in the tool

![](upload://5vQzzU14nMh3Jz5zIQwFkrqEPD7.png)This query is executed 27 times on database neo4j

Database Connection

In this version of the Query Log Analyzer a connection to database is made which makes the following functions available:

  • Explain Plan
  • Current Queries
  • Query Stats

Explain Plan

When you have a Query displayed (less than 10000 characters) in the tool you can start a “Explain Plan” of this query by pressing the following icon.


After clicking a Query Details screen will be shown with the Query plan in it.

![](upload://48iwPxYI3heDJtKmKIDG4nOPC3i.png)You can zoom in zoom out on the plan, the current selected step ‘Procedure Call’ is shown at the right. When You click on ‘Next’ you jump to the next Query Planning step

With the color of the ‘Step’ you can see if the step is expensive or not, so things like All Nodes Scan or Full Label Scan are in red. The explain plan will be executed on the database where the query was executed on.

Current Queries

With this function it is possible to show the current running queries on the database. In the figure below you see a screenshot when working with version 4 of the Neo4j database. Per database you can list the current running queries.

![](upload://eWwx81msBO0eGwp0eiu4ednQDCc.png)Here is a connection to a version 4 database which run’s two databases ‘neo4j’ and ‘base1’

Query Stats

Since version 3.5.4 the database collects the query statistics for the last 8192 invocations and keeps that in memory. This is a great way to see what the latest load was on the server. If you want to fine tune your queries you have here the query times in micro seconds (the query log uses milliseconds). This also works when the query logging to file is switched off.


When you click on the timeline icon you can see the Invocation Time Line for this query.


Neo4j Database Analyzer 1.0.1

The main change in this tool is that can handle multiple databases on a Neo4j server version 4. You will now have a tab per database. The functionality of the Neo4j Database Analyser is described in the introduction of this tool.

![](upload://tB5PPwmjwHkoZRcUYJFRPVJ3VCe.png)The tool is connected to a Neo4j version 4 database, where two databases “neo4j” and “base1” are running


The source code for the Query Log Analyzer is on Github at kvegter/query-analyzer-app. There you can read the documentation and report issues.

The source code for the Neo4j db Analyzer is on Github at kvegter/dbreportapp. There you can read the documentation and report issues.

If you have questions regarding the query performance, you can always head to the #help-cypher channel on the Neo4j Users Slack or on the neo4j community.


Neo4j Query Log Analyzer and DB Analyzer Update - for Neo4j 4.0 with new Features was originally published in Neo4j Developer Blog on Medium, where people are continuing the conversation by highlighting and responding to this story.