Book Image

Neo4j Cookbook

By : Ankur goel, Ankur Goel
Book Image

Neo4j Cookbook

By: Ankur goel, Ankur Goel

Overview of this book

Table of Contents (17 chapters)
Neo4j Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Optimizing the Cypher query for performance


Cypher is the most important aspect of Neo4j, and many migrations to the Neo4j database from their SQL counterparts are because of it. It provides easy migration from the SQL background to Neo4j without losing flexibility in querying, which the SQL language provides.

In this recipe, you will learn the various aspects of how to improve Cypher query performance; however, it totally depends on the domain and the application involved.

Getting ready

To get started with this recipe, install Neo4j using the earlier recipes from Chapter 1, Getting Started with Neo4j, of this book.

How to do it...

The profiling of a Cypher query should be the first step.

Now, you will learn some aspects of how to improve Cypher query performance, which are explained here:

  • Index decision: An index is the single most thing that can increase Cypher performance by many folds, but this doesn't mean that you index on everything, as over indexing can create lots of I/O to disk and hence...