I was trying to delete all data from the database. And I keep having issues.
First, I was told just to stop the server and delete "/data" but it's not possible on AuraDB, and generally it's the wrong solution for the script I'm writing.
Second, it was suggested to use
"CREATE OR REPLACE DATABASE neo4j;"
But it's not supported on AuraDB
Now Third is the approach using Cypher, I found this query:
MATCH (n)-[r]-()
CALL { WITH r
DELETE r} IN TRANSACTIONS OF 10000 ROWS
WITH n
CALL { WITH n
DELETE n} IN TRANSACTIONS OF 10000 ROWS;
And I thought It was working until I got an OutOfMemory error.
dbms.memory.transaction.global_max_size threshold reached
From running "profile" on this query, it turns out that the number of rows in the transaction has no impact on memory usage because the first fetch is eager. To be clear increasing memory is not an option.
I'm completely out of ideas. Any help is greatly appreciated.