O'Reilly logo

Learning Neo4j 3.x - Second Edition by Rik Van Bruggen, Jérôme Baton

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

Indexes

In Neo4j, indexes are used to find the starting points of the queries. You can count on them. Indexes are automatically created on properties that have a constraint. Otherwise, you can create an index with a query like the following:

CREATE INDEX ON :LabelName(propertyName)

However, refrain from creating an index for every property of each label as they need to be maintained by the server when data is inserted. It is taken care of  here, but there is no magic.

The command to get the list of indexes in use in your graph is as follows:

CALL db.indexes

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