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

Force label usage

You may also force the planner to start by evaluating nodes for a label instead of an index. This is particularly useful if you are querying for nodes having two labels and you know that one of the labels is more restrictive than the other. In this example, we could have a billion locations in Japan so why look all of them to see if they have the Tower label? It's better to do it the other way.

MATCH (t:Location:Tower)USING SCAN t:TowerWHERE t.country='JPN'RETURN t

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