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.

Optimize query with 2 depth

I have a graph of more than 1 M nodes, and try to find the nodes at two depth with multiple relation. Always hit out of heap space error when trying to run. Is there anyway to optmize the query?

MATCH (a:person)-[r1:relation]->(b:customer)-[r2:relation]->(c:person)
WITH a,c,count(b) as cnt, sum(r1.weight) as sum1, sum(r2.weight) as sum2
WHERE cnt > 5 and sum1+sum2>10000

new to neo4j, a lot of questions.

0 REPLIES 0