graph databases - neo4j Nodes Deleted (but not Actually) -


i delete nodes of label executing

match (p:alabel) delete p; 

this returns comment "no data returned." states how many nodes deleted, , how long took (5767 ms). however, shell seems stop responding after this, , unable execute other commands.

i used command, encouraged this answer:

match (n:alabel) optional match (n)-[r]-() delete n, r; 

executing command took longer (16929 ms). still not return.

depending on amount of changes need choose appropriate transaction size, otherwise you'll see excessive garbage collections and/or oom exceptions. use limit clause , return number of deleted nodes. run statement multiple times until 0 returned:

match (n:alabel) n limit 5000 optional match (n)-[r]-() delete n,r  return count(distinct n) 

here batch size 5000 nodes.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -