I'm wondering what is the complexity of the following cypher query:
MATCH (i:Instance{id:{InstanceID}})
RETURN i
LIMIT 1
The "id" has unique constraint:
CREATE CONSTRAINT ON (i:Instance) ASSERT i.id IS UNIQUE;
How the search time is affected with a growing number of Instance nodes?
答案 0 :(得分:4)
Due to the unique index this node lookup will be backed by an index (internally Lucene is used here). So it should be O(log(n))
.