O'Reilly logo

Building Web Applications with Python and Neo4j by Sumit Gupta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Cypher query optimizations

In this section, we will talk about the various utilities, features, tips, and tricks available and provided by Neo4j to improve the performance of our Cypher queries.

Before moving forward, let's clean up our database once again and recreate our sample dataset.

Perform the following steps to clean up your Neo4j database:

  1. Open your Linux console or shell and execute "<$NEO4J_HOME>/bin/neo4j-shell".
  2. Execute the following Cypher queries to delete the data from Neo4j database.
    MATCH (n)-[r]-(n1) delete r,n.n1;
    MATCH n delete n;

Next, recreate the sample dataset provided in the Pattern and pattern matching section of Chapter 2, Querying the Graph with Cypher.

Further in this section, we will refer to the data created by our sample ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required