I need some clarifications on API. Let say we are loading some adjacency list. How do we handle in this scheme that node already exists? Do we index the nodes after the insertion ( using for example getAllNodes operation?) . Thanks, Luda
> Hi, > > As you may or may not know, the Neo4j kernel is heavily optimized for > reads and transactional updates, which in a typical transactional > system probably constitute 95+% of the operations. So far, we haven't > focused on raw batch insert velocity, since that's typically a > one-time operation that you execute when you're bootstrapping a > project and then never again. > > However, having said that, when you DO import your initial data it's > kinda nice if that import is a reasonably performant operation. So > we've decided to develop a specific batch insert API that is optimized > for insertion. See API outlined in the ticket below. > > Do you have any input on this API? Is it a convenient API for that > first importer that parses your CSVs or XML or SQL dumps and injects > the data into Neo4j? > > Please give input either in this thread or in ticket comments. > > Cheers, > > -EE > > > ---------- Forwarded message ---------- > From: neo4j.org <nore...@neo4j.org> > Date: Wed, May 6, 2009 at 01:03 > Subject: [Neo tickets] #167: Create a batch insert API > To: > Cc: tick...@lists.neo4j.org > > > #167: Create a batch insert API > ---------------------------------+------------------------------------------ > Reporter: johans | Owner: johans > Type: enhancement request | Status: new > Priority: major | Milestone: neo-1.0-b9 > Component: neo | Keywords: > ---------------------------------+------------------------------------------ > Create a batch insert {{{API}}} that drops support for transactions and > the like in favor of speed. This is useful to get already existing data > (existing in some form) injected into a Neo4j store. > > Here is the the suggested API: > {{{ > long createNode( Map<String,Object> properties ) > void createNode( long id, Map<String,Object> properties ) > long createRelationship( long startNode, long endNode, > RelationshipType type, Map<String,Object> properties ) > void setNodeProperties( long node, Map<String,Object> properties ) > void setRelationshipProperties( long rel, Map<String,Object> properties ) > Map<String,Object> getNodeProperties( long nodeId ) > Map<String,Object> getRelationshipProperties( long relId ) > Iterable<Long> getRelationshipIds( long nodeId ) > Iterable<SimpleRelationship> getRelationships( long nodeId ) > SimpleRelationship getRelatoinshipById( long relId ) > }}} > > Implementation is in progress and here are some details: > > * Everything will be optimized for insert only. > * Use create methods and supply properties for nodes and relationships > right away. The setProperties methods approach is slower. > * Get operations may be slow. > * Delete operation has been left out completely for now. > * If anything breaks (you get a exception from an API call) your store is > garbage and you have start over with a fresh new one. > > -- > Ticket URL: <https://trac.neo4j.org/ticket/167> > neo4j.org <http://trac.neo4j.org/> > The Neo4J.org Issue Tracker > _______________________________________________ > Tickets mailing list > tick...@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/tickets > > > > -- > Emil Eifrém, CEO [e...@neotechnology.com] > Neo Technology, www.neotechnology.com > Cell: +46 733 462 271 | US: 206 403 8808 > http://twitter.com/emileifrem > _______________________________________________ > Neo mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > _______________________________________________ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user