It does not make any difference. I'm using RestGraphDatabase as a graph db.
There's nothing I've set. The environment is windows 7 x64 and i5-3570 and 16GB ram. 2014년 1월 20일 월요일 오전 9시 30분 55초 UTC+9, Michael Hunger 님의 말: > > The problem is that you try to create one node per tx, you should try to > do 20-50k per tx. > > Then it only takes a few seconds to create 1M nodes. > > // values should be a list of 20-50k elements > > > public void createNodes(String type, String key, List<String> values) > > > > { > > Label label = DynamicLabel.label(type); > > try (Transaction tx = graphDB.beginTx()) > > { > for (String value : values) { > Node createdNode = graphDB.createNode(label); > > > > createdNode.setProperty(key, value); > > } > > tx.success(); > > } > > } > > Am 20.01.2014 um 00:31 schrieb frandro <fran...@gmail.com <javascript:>>: > > > Dear all, > > > > I'm just testing much work how much Neo4j can endure. > > > > I'm planning to make 1 million nodes and relations more than the nodes. > > > > I coded a method that creates a node as following and a caller to it in > a for loop to create nodes as many as specified in the for loop. > > > > The problem is that it takes 20~30 seconds to create 1,000 nodes. It'll > take more than a day to create 1 million nodes. > > > > What's the problem? Is there another way to make it faster? > > > > public Node createNode(String type, String key, String value) > > > > { > > Node createdNode; > > > > try (Transaction tx = graphDB.beginTx()) > > { > > createdNode = graphDB.createNode(DynamicLabel.label(type)); > > createdNode.setProperty(key, value); > > > > tx.success(); > > } > > > > return createdNode; > > } > > > > > > -- > > You received this message because you are subscribed to the Google > Groups "Neo4j" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to neo4j+un...@googlegroups.com <javascript:>. > > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.