cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site migration is underway. Phase 2: migrate recent content

Want: in hash

clem
Graph Steward

I believe one thing that can cause degradation in performance, is that the IN LIST operator does a linear search across an array (maybe I'm wrong...).

Perhaps Neo4J could turn the list into a hash before execution so that testing for membership is faster.

The documentation doesn't say otherwise. If Cypher does treat a LIST as a hash when doing a membership test, it should say so in the documentation.

See:

2 REPLIES 2

For IN LISTit is actually turned into a (hash)-set on the first iteration so subsequent uses of that list use the companion hashset internally.

if there is an index on :Article(id) it will send the whole list to the index instead doing an IN LIST

So it should be reasonably fast if there is enough RAM and/or fast IO.

This needs to be mentioned in the documentation!

Thanks.