How about splitting it in multiple queries?

START node=node(12346L)
MATCH node - [r2:FOWARD] - user - [r3] - ()
DELETE r3,user;


START node=node(12346L)
MATCH node - [r1] - ()
DELETE r1,node;

You can also increase your heap or have the queries only work on a batch of
data.

How much is "rich"-relationships?





On Fri, May 30, 2014 at 5:25 AM, <[email protected]> wrote:

> Hi there,
>
> I use the neo4j 1.9.7 enterprise version.
>
> Now I need to delete some graph. Following that :
>
> START node=node(12346L)
> MATCH node - [r2:FOWARD] - user - [r3] - user2
> DELETE r3
> WITH node,user
> DELETE user
> WITH node
> MATCH node - [r1] - user1
> DELETE r1
> WITH node
> DELETE node
>
> When the data is very big,it will tell me java heap space . The
> relationship all are rich-relationship.
>
> I hope to know that whether it has more better for this.
>
> Thanks
>
> --
> 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