0
votes

Query

match (u:SomePersonBean{sex:"m"}) return u  limit 10

this query will return 10 result! But...

start u=node:SomePersonBean(sex="m") return u  limit 10

this query return 0 result! WHY?

What the difference between the following two neo4j cypher querys ?

Which uses the index?

Which uses the label-base index?

Which uses the Legacy index?

1
I believe both use the label index. The one that uses START uses the legacy index. If you want to know the detailed differences, ask the neo4j-shell for the query plan. Type "profile" before the query, i.e. profile match (u:SomePersonBean{sex:"m"}) return u limit 10 and the shell will explain how it executes.FrobberOfBits

1 Answers

1
votes

The second query uses the legacy index, that you have to populate manually.

The first one is the way to go.

See: for schema index and for legacy index.