How much memory do you have? And how many relationships.

Batching works actually nicely,
e.g.

MATCH(n:node) WITH n limit 100000
DETACH DELETE n


With our procedure library you could do:

call apoc.periodic.commit("MATCH(n:node) WITH n limit 100000 DETACH DELETE
n RETURN count(*)",{})

Michael

On Wed, Nov 2, 2016 at 3:06 AM, Tan Chen <[email protected]> wrote:

> Hello,
>
> I'm new to Neo4j and Cypher. As I'm playing around and loading my data, I
> find that I want to delete my data and reload them. [for example I didn't
> load my numbers with ToInt() or ToFloat()]. I know I can delete the nodes
> with:
> MATCH(n:node)
> DETACH DELETE n
>
> The problem that I'm facing is that when I run the script, it takes a long
> time, and then it hangs. I think the solution is to run it in shell. I'm
> running Neo4j on windows, and I'm not sure how to run the Neo4j shell. I
> also know that I can subset my nodes and delete them in batches, but that
> is not efficient for 1.5 million nodes. Any suggestions?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to