I'm trying to query the following code in Neo4j Desktop but it can not work due to spent too much time (The data have been loaded into Neo4j successfully with 277 nodes)
###################################
MATCH (e:Process)
WHERE e.user = "No User"
MATCH (n:User)
WHERE n.user = "No User"
MATCH (p:Process)
MATCH (l:Event)
WHERE p.parentID = "No ID (Process)" AND p.pid = l.pid AND l.eventid = 1
MATCH(k:Event)
MATCH (file:File)
WHERE NOT file.eventid = 11
MATCH (createordeleteregistry:Createordeleteregistry)
WHERE NOT createordeleteregistry.eventid = 12
MATCH (deletefile:Deletefile)
WHERE NOT deletefile.eventid = 23
MATCH (registry:Registry)
WHERE NOT registry.eventid = 13
DETACH DELETE e,n,p,k,file,createordeleteregistry,deletefile,registry
###################################
However, after I split the above code into ten pieces to run, i.e.,
######## (First piece) #########
MATCH (e:Process)
WHERE e.user = "No User"
DETACH DELETE e
###########################
######## (Second piece) #########
MATCH (n:User)
WHERE n.user = "No User"
DETACH DELETE n
###########################
…
#########(Ten piece) #######
MATCH (registry:Registry)
WHERE NOT registry.eventid = 13
DETACH DELETE registry
###########################
it becomes very fast (each pieces finish within 1 second)
What caused of this different and how to just query overall instead of split into pieces?
In fact, the similar question comes up. If I query all code then Java Heap Space error shows. Such problem can be solved if I just split my query code into piece. This confused me a lot, I want to query all code instead of split into pieces
Thanks.