I am using Neo4j to build a huge graph database (over a million nodes). The way I'm doing it right now is running a cypher CREATE (n {property:'value'})
query for each of the node. As expected, this is quite an inefficient method and it takes lots of time. Can somebody suggest me some alternative method to overcome this issue? I've heard that Neo4j also provides some default batch interface to create multiple nodes. I'm currently using this version of code (including the relationship):
create (a { name: "a" })-[:rel1]->(b {name : "b"}),(c {name: "c"})-[:rel2]->(d {name:"d"}),...
Is it an efficient method or are there any better methods? Thanks in advance! :)