New GraphAcademy Course: Cypher Query Tuning in Neo4j 4.0


Learn about our new GraphAcademy course, Cypher Query Tuning in Neo4j 4.0.


We have added this new course to our catalog of free online courses – Cypher Query Tuning 4.0.

This course is intended for experienced Cypher developers who want to learn about the most important best practices for writing queries that are performant.

This course includes hands-on exercises that give you the opportunity to tune queries where you tackle the most challenging issues for making your queries run better. If you perform the hands-on exercises in this course, it should take you about four hours to complete.

The focus of this course is to teach you query tuning for Cypher queries that retrieve data from the graph, but many of the principles you learn in the course can also be applied to Cypher code that updates the graph, particularly loading data.

Here are the lessons of this course:

How Queries Work in Neo4j


Learn about what happens under the covers when you execute a Cypher query.

You will learn what an execution plan is, as well as the Page Cache and Execution Plan Cache that is used during query processing. Next, you will learn how a query starts its traversal in the graph and the importance of controlling the flow of the execution plan with your Cypher.

You will also learn about how meta-data and indexes in the graph are used to aid in the execution plan creation.

Preparing for Query Tuning


In this short lesson, you will learn how you should set up your environment for tuning your queries.

You will learn about the importance of memory when queries execute and how the Execution Plan Cache is used. You will also learn the steps you must take before you begin the query tuning process to make sure that the queries you are measuring behave as expected.

Reducing Cardinality


Cardinality in an Execution Plan refers to the number of rows(data) that need to be passed between the steps of the query from initial anchoring of the nodes for the query, processing of data during the query, and streaming the results of the query back to the client.

There are many ways that you can modify queries to reduce this cardinality and thus, make the query perform faster. You will learn the best tips and tricks for tuning queries to reduce cardinality.

Optimizing Property Access


In a property graph such a Neo4j, properties can be associated with nodes and relationships.

This lesson teaches you that property access is expensive and your goal should always be to minimize the number of properties that need to be accessed to satisfy the query.

Monitoring Queries


This short lesson teaches you how to monitor queries that are running and how you can programmatically kill them if they are running for too long.

You will also learn the configuration settings you can use for controlling what queries are logged. Finally, you will have the opportunity to use the Neo4j Query Log Analyzer Tool for viewing queries.


Ready to get started with a deeper dive into Cypher Query Tuning in Neo4j 4.0 ?

Enroll Today