I have following query running in neo4j (community 3.5)
MATCH (a:master_node:PERF:Application)-[r1]->(n:master_node:PERF)-[r:AFFINITY]->(m:master_node:PERF)<-[r2]-(a1:master_node:PERF:Application) WHERE exists(n.latest_ingestion) AND exists(m.latest_ingestion) AND id(a) <> id(a1) MERGE (a)<-[:APP_AFFINITY]-(a1)
and my configurations for neo4j are as follows:
heap_size : 8GB page_cache : 4GB
and I have Indexes for the label(Application) on property(name) and above query running over 100k nodes.But the Query is running for longer time and consuming so much of memory.
Please help me out to improve the performance.