Cypher: Use WHERE clause or MATCH property definition for exact match?

前端 未结 1 1030
说谎
说谎 2021-01-18 21:23

In Neo4j (version 3.0), the following queries return the same results:

1. MATCH (a:Label) WHERE a.property = \"Something\" RETURN a
2. MATCH (a:Label {proper         


        
相关标签:
1条回答
  • 2021-01-18 21:45
    1. yes
    2. no, both evaluate basically to the very same query plan. Since Neo4j uses a cost based optimizer the query plan might change over time since the optimizer consider to change (maybe there's now more data so a index lookup is cheaper than a NodeByLabelScan).
    0 讨论(0)
提交回复
热议问题