title: Neo4j Match and Create takes too long in a 10000 node graph
body: <p>I have a data model like this:</p>
  
  <ul>
  <li>Person node</li>
  <li>Email node</li>
  <li>OWNS relationship</li>
  <li>LISTS relationship</li>
  <li>KNOWS relationship</li>
  </ul>
  
  <p>each Person can OWN one Email and LISTS multiple Emails (like a contact list, 200 contacts is assumed per Person).</p>
  
  <p>The query I am trying to perform is finding all the Persons that OWN an Email that a Contact LISTS and create a KNOWS relationship between them.</p>
  
  <p><code>MATCH (n:Person {uid:'123'}) -[r1:LISTS]-&gt; (m:Email) &lt;-[r2:OWNS]- (l:Person) 
  CREATE UNIQUE (n)-[:KNOWS]-&gt;[l]</code></p>
  
  <p>The counts of my current database is as follows:</p>
  
  <ul>
  <li>Number of Person nodes: 10948</li>
  <li>Number of Email nodes:  1951481</li>
  <li>Number of OWNS rels:    21882</li>
  <li>Number of LISTS rels:   4376340 (Each Person has 200 unique LISTS rels)</li>
  </ul>
  
  <p>Now my problem is that running the said query on this current database takes something between 4.3 to 4.8 seconds which is unacceptable for my need. I wanted to know if this is normal timing considering my data model or am I doing something wrong with the query (or even model).</p>
  
  <p>Any help would be much appreciated. Also if this is normal for Neo4j please feel free to suggest other graph databases that can handle this kind of model better.</p>
  
  <p>Thank you very much in advance</p>
  
  <p>UPDATE:</p>
  
  <p>My query is: <code>profile match (n: {uid: '4692'}) -[:LISTS]-&gt; (:Email) &lt;-[:OWNS]- (l) create unique (n)-[r:KNOWS]-&gt;(l)</code></p>
  
  <p>The PROFILE command on my query returns this:</p>
  
  <p><code>Cypher version: CYPHER 2.2, planner: RULE. 3919222 total db hits in 2713 ms.</code></p>
  
  <p><a href="https://i.stack.imgur.com/aO0Bf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aO0Bf.png" alt="enter image description here"></a></p>