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: https://install.graphapp.io
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:
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:
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
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.
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.
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.
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 Analyzer is described in the introduction of this tool.
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.