Performance: Index VS Label

Is there a fast query to extract a certain label node “Person” (without iterating all the Graph DB) and then extract a node within the relations of that label (that defines a group) with a special feature? (like the example: eq(name, “Rafa”)

As long as you have the appropriate indexing (which you do in your example), the lookup will be fast. It doesn’t have to search through all nodes, it can just go straight to the “Rafa” node.

EDIT: Sorry, I misread your question. Once you’re at the “Rafa” node, if you have a different predicate for each label, you can just follow the reverse label edge to find all other nodes with the same label. You need to use a @reverse index to enable reverse edge traversal.

1 Like