What's your schema? Do you have a unique constraint or index on the labels
+ id you're merging on?

Eve

On Thu, Feb 7, 2019 at 12:23 PM <andrea.balz...@keypartner.it> wrote:

> Hello everyone, i'm trying to MERGE thousands of nodes using UNWIND and
> apoc procedures (for a dynamic label creation) using Java Driver as follows:
>
>         String query =
>                 "UNWIND $nodes AS n " +
>                 "CALL apoc.merge.node([n.category], {id: n.id}, n) YIELD
> node RETURN node";
>         session.run( query, params );
>
>
> My database contains something like 150k nodes divided by 16 labels and
> 130k relationships of the same type. It worked fine so far, it never failed
> to deliver, but now that i'm trying to create something like 4k new nodes
> and 5k new relationships at once it took more than 30 minutes. I feel like
> it should be way faster than this.
>
> Am i doing anything wrong? Is it really supposed to be this slow? Is there
> anything i can do to make this process smoother and to improve performances?
>
> Thanks in advance
>
> --
> 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 neo4j+unsubscr...@googlegroups.com.
> 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 neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to