We have seen how to check whether our queries are wasting resources and how to correct them, because CPU cycles are time and electric power, and your time is precious! Notwithstanding the fact that it generates heat and the climate is already a mess.
We saw Neo4j's execution plans, how to read them, and spot what may be an issue. We saw what the parameters are and how they might remind you of JDBC's PreparedStatements
. We saw how to force the use of indexes or labels (you may have to do a comparison of the performances of both, depending on your graph and queries). Remember this old saying that elders transmit to younger disciples of our profession: Make it work, then, and only then, optimize!
Now, let's switch to something totally different: Chapter 8, Importing data into Neo4j.
The import queries can be profiled too!