Neo4j rapid removal of database data

During the development process, often you need to fast (Jane) speed (single) clear (crude) massive data nodes and relational data (storm) Neo4j present in addition. In this case, delete and detach from a performance are powerless. Neo4j officially recommended method to clear the reservoir, the database file is deleted graph.db, violence empty database.
1. Close Neo4j server process
checks the server process is started, such as starting, by the server process may kill or otherwise kill -9.
2. Delete graph.db database files
found <NEO4J_HOME> / data / databases / path, you can see graph.db folder. Delete this folder.
Linux can be deleted by the following command
RM -rf graph.db
1
3. Restart the server Neo4j
following command to start Neo4j by the bin directory execute
./neo4j Console
1
Neo4j during the boot process, you will find graph.db folder is missing, re-establish The new data, thus completing the task of emptying.
4. Reset Password Neo4j Browser connection
due to re-establish the database, the database need to set a user name and password. May be reset by Neo4j Browser starts after the connection, it can also be provided through the command line and the like.
Through the above four steps, i.e. complete emptying Neo4j data.
---------------------

Original: https: //blog.csdn.net/u013184884/article/details/82854202

 

Suddenly found to import data before there is a problem, then the data obtained before emptying
Neo4j community there are two programs (http://neo4j.com.cn/topic/5b0612549662eee704f31d45):
a, Cypher with the following statement:
match (n-) detach delete n
Second,
1, stopped service;
2, deleting graph.db directory;
3, restart the service.
For small amounts of data, the first option is very convenient, but when a large amount of data is very slow, and likely to cause a memory overflow, after all, is to check out and then deleted, this time it should use the second option, convenient and fast .
---------------------

Original: https: //blog.csdn.net/u012485480/article/details/83088818

Guess you like

Origin www.cnblogs.com/xibuhaohao/p/11161774.html