cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Is Apoc faster even for simple queries?

admin3
Node Clone

Hi,

I noticed on a very simple query that apoc is faster.
I really find that hard to believe and wanted to ask.

This is the cypher query

MATCH (one :Main {uuid : "d67910e9-e594-4217-89f9-c7673125d1d0" })
MATCH (two :Main {uuid: "a952eac7-5ef2-4a2c-a8f1-07e1af0fe627" })
return exists((two)-[:AFFILIATED_WITH]-(one))

This is the apoc one

MATCH (one :Main {uuid : "d67910e9-e594-4217-89f9-c7673125d1d0" })
MATCH (two :Main {uuid: "a952eac7-5ef2-4a2c-a8f1-07e1af0fe627" })
return apoc.nodes.connected(two,one, 'AFFILIATED_WITH')

Does this make sense?

Should I use apoc for simple queries like these?

0 REPLIES 0