David, Thank you so much for the explaination and suggestion. What I meant by dynamic was, we would not have all the data initially to load at once. Bulk of the data (Nodes/Relationships) would be loaded by users of the application by uploading spread sheets into the application on a regular(say daily/weekly) basis. So I was wondering if there was a way to switch between BatchInserter & GraphDatabaseService within the application to take advantage of BatchInserter's superior performance for bulk inserts. Honnur
--- On Mon, 8/16/10, user-requ...@lists.neo4j.org <user-requ...@lists.neo4j.org> wrote: From: David Montag <david.mon...@neotechnology.com> Subject: Re: [Neo4j] BatchInserter & GraphDatabaseService pointing to the same graph db To: Neo4j user discussions <user@lists.neo4j.org> Message-ID: <aanlktim85tnjzhb0hocv3ypsvharftx2bruy9kbxq...@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Hi Honnur, I believe that you will have to shutdown() the EmbeddedGraphDatabase first before using the BatchInserter. And keep in mind that the BatchInserter should only be used from a single thread. You could of course build your own GraphDatabaseService that delegates to these two implementations, but you'd have to take the threading aspect into mind. And you'd have to re-instantiate the EmbeddedGraphDatabase for caching reasons though, and then you'd lose your whole cache. So I'd say, just go with EmbeddedGraphDatabase. Please explain the "dynamic" usage and your scenario more. David On Mon, Aug 16, 2010 at 10:30 AM, Honnur Vorvoi <vhon...@yahoo.com> wrote: > Would it be possible to switch between BatchInserter(say when the inserts > are more than 25000) and GraphDatabaseService ( when the inserts are less > than 25000) pointing to the same graph db? > We would like to use the BatchInserter for bulk inserts and the normal > EmbeddedGraphDatabase for regual operations within the same application. > > Would be interested in any better suggestions for inserting > nodes/relationships dynamically(ie, when all the nodes/relationships are not > available initially but only during the usage of the application) > > Thank you > _______________________________________________ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user