I am wondering about the performance of the following string comparison in where clause:
MATCH (p: Person) WHERE NOT p.name='Person 1' AND NOT p.name='Person 2' RETURN p
MATCH (p: Person) WHERE NOT (p.name='Person 1' OR p.name='Person 2') RETURN p
MATCH (p: Person) WHERE NOT p.name IN ['Person 1', 'Person 2'] RETURN p
I have tried on my database but the result is not united, sometimes case 3 gets be best response time and db hits, sometimes the best is case 1 and case 2.
Can you please make this clear for me?