Am 28.08.2014 um 19:17 schrieb 'Curtis Mosters' via Neo4j 
<[email protected]>:

> Hi I don't like the current speed of Neo4j with Java API.
> 
> I have written an example that just inserts random data. In the case 160k:
> 
Change it to batching commits every 30k to 50k nodes not every node.


Transaction tx = graphDb.beginTx();

> for (int i = 0; i < 160000; i++) {
>                 myFirstNode = graphDb.createNode();
>                 myFirstNode.setProperty( "id", "1" );
>                 myFirstNode.setProperty( "name", "Duane Nickull, I 
> Braineater" );
                   if (i % 30000 == 0) {
>                     tx.success();
                       tx.close();
                       tx = graphDb.beginTx();
                  }     
>             }

>                     tx.success();
                       tx.close();

With the java API you usually can import 50 to 100k nodes per second.

   
> 
> this needs 22 seconds + ~2 minutes of tx.success() finishing or so. That's 
> pretty bad if you ask me.
> 
> So how can I improve the speed of the insert.
> 
> Already thought about it, maybe with:
> 
> disabling tx
> declare massive insert
> inserting every 10k
> So yeah basically help me to speed it up. Please don't say to use the 
> batch-inserter. He is fine but noch practicable for me.
> 
> Thank you.
> 
> 
> -- 
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to