title: Neo4j update nodes from CSV file
body: <p>I need to update the already existing nodes with new data and create a new one if the node doesn't exist. I am trying to do that with the following query:</p>
  
  <pre><code>USING PERIODIC COMMIT
  LOAD CSV WITH HEADERS FROM
  'file:///C:/Users/Zona5/Documents/Neo4j/check/import/cd1_5.csv' AS     line1
  MERGE (c:Company {companyNumber:line1.companyNumber})
  WITH c, line1
  MERGE (ca:CompanyAddress)
  ON CREATE SET ca.county=line1.County
  ON MATCH SET ca.county=line1.County
  ON CREATE SET ca.country=line1.Country
  ON MATCH SET ca.country=line1.Country
  ON CREATE SET ca.postCode=line1.postCode 
  ON MATCH SET ca.postCode=line1.postCode
  ON CREATE SET ca.poBox=line1.POBox
  ON MATCH SET ca.poBox=line1.POBox
  ON CREATE SET ca.careOf=line1.CareOf
  ON MATCH SET ca.careOf=line1.CareOf
  ON CREATE SET ca.addressLine1=line1.AddressLine1
  ON MATCH SET ca.addressLine1=line1.AddressLine1
  ON CREATE SET ca.addressLine2=line1.AddressLine2
  ON MATCH SET ca.addressLine2=line1.AddressLine2
  MERGE (c)-[:HAS_COMPANY_ADDRESS]-&gt;(ca)
  </code></pre>
  
  <p>The query is running for a long time but the database size does not increase. </p>
  
  <p>Am I doing something wrong here and is there another way to update the nodes?</p>