i work large database using determine shortest path in graph database. when set few relationships or nodes not correct, tend delete database in single command , correct. have encountered interesting phenomenon, classic command this... :
match (n) optional match (n)-[r]-() delete n,r ...take different amounts of time commit it. 4/5 cases, not commit @ , know why. working 9000 nodes, think reasonably small number worried (neo4j should able handle 100000+ nodes ease)
depends on number of relationships , properties deleting. neo4 transactional databases has keep intermediate state until tx commits in memory.
you faster off deleting graph.db directory , starting server again.
otherwise can batch this:
match (n) n limit 10000 optional match (n)-[r]-() delete n,r return count(*); until returns 0
Comments
Post a Comment