For ex:
MATCH (student:Student{id:123})
MATCH (class:Class{name:'Cypher101'})
MERGE (student)-[:ENROLLED_IN]->(class)
In my db, the relationship ENROLLED_IN
is 99% exist most of time, just need create first time.
So assume they are all exist, does any performance between the MATCH version?
MATCH (student:Student{id:123})
MATCH (class:Class{name:'Cypher101'})
MATCH (student)-[:ENROLLED_IN]->(class)