Deleting all nodes and relationships in neo4j using cypher exceeds heap space

后端 未结 6 1685
失恋的感觉
失恋的感觉 2021-02-05 20:50

I have been trying to run this query as recommended in the neo4j google group and in other sources online:

START n = node(*) MATCH n-[r?]-() WHERE ID(n)>0 DELETE n, r;

6条回答
  •  萌比男神i
    2021-02-05 21:17

    As of Neo4j 2.3.3, a new way of removing node and relationship had been introduced. See 2.3.3 Docs.

    For example, you could do:

    MATCH(n) DETACH DELETE n;
    

提交回复
热议问题