We have noticed some performance issues after migrating from Neo4j version 4 to version 5.
I have reviewed the indexing, and it appears to be the same as before.
Could you please suggest any solutions or steps we can follow to improve performance and optimize the overall application?
Hi @dana_canzano, I'm not entirely sure about the exact timing, as it varies depending on the queries. For example, queries that previously took around 100ms are now taking approximately 150ms, and those that took 1.2s are now taking around 2.5s.
During the migration process, I took a dump from the older version of the database and simply imported it into the newer version. I also updated the Neo4j driver package to the latest version for Node.js (v5.28.0).
So, if I'm not mistaken, it's performing a default block format migration.
I ran the following Cypher query to check the database configuration:
SHOW DATABASES YIELD name, store;
The result shows that both the neo4j and system databases are using the record-aligned-1.1 store format, which is expected and aligns with the standard format used in Neo4j 5.x.
The result shows that both the neo4j and system databases are using the record-aligned-1.1 store format, which is expected and aligns with the standard format used in Neo4j 5.x.
ok. but this is in contrast to your prior comment of
Yes, you're right β I made a mistake in my earlier comment as I wasnβt fully aware of the store format details at that time.
Now that I understand it better, Iβd like to clarify β is the store format actually contributing to the performance issue weβre seeing?
Also, could you please advise whether using the store type block format (if available) would be more efficient, or is the current record-aligned-1.1 format already the most optimal in terms of performance?
Iβd appreciate your suggestion on this so we can explore any potential improvements.
You shouldnt have to migrate to block as performance from v4 to v5 should be equivalent if not better. However moving to block may introduce better performance.
So back to why is v4 'faster' than v5? Do you still have the v4 environment available such that you could compare.
a. conf/neo4j.conf setting, specifically related to `dbms.memory*`
or `server.memory*`
b. can you preface a know query with performance concerns
with `PROFILE` and compare the query plans?
@dana_canzano I tried changing the database store format from "aligned" to "blocks" in my local environment, but I didnβt observe any significant improvement in query performance. Also, I currently donβt have access to a v4 environmentβotherwise, I would have tested it there as well.
While upgrading the database version, I also updated the Neo4j driver to the latest version. My project uses GraphQL as well, and I'm currently running it on Node.js v16.4.2.
Iβm wonderingβcould the issue be related to the older versions of the GraphQL-related packages? Hereβs what Iβm currently using: