Hi Vishesh, There are a number of ways to perform SPARUL insert/update/delete operations with Virtuoso in the tips and tricks guide, at:
http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtTipsAndTricksGuide#RDF%20data%20management The key being to perform such operations with log_mode(3) to set transaction logging mode to autocommit, particularly when performing a large number of such operations which would otherwise consume large amounts of memory affecting the performance of the system significantly ... Best Regards Hugh Williams Professional Services OpenLink Software, Inc. // http://www.openlinksw.com/ Weblog -- http://www.openlinksw.com/blogs/ LinkedIn -- http://www.linkedin.com/company/openlink-software/ Twitter -- http://twitter.com/OpenLink Google+ -- http://plus.google.com/100570109519069333827/ Facebook -- http://www.facebook.com/OpenLinkSoftware Universal Data Access, Integration, and Management Technology Providers On 7 Dec 2012, at 10:23, Vishesh Handa wrote: > Hey everyone > > In our install, we have a case where we need to move triples from one graph > to another. This is a fairly regular operation, and we would like it to be as > fast as possible. > > The current approach that we are using is - > > SQL> sparql delete from <graph> { triples } where { triples } > SQL> sparql insert into <newGraph> { triples } > > Since all the triples are quite often not in the same graph. We land up > executing the delete statement a number of times. > > Is there any better way of doing this? > > I experimented with directly updating the SQL tables. Though I do not think > we should be doing this as the virtuoso documentation [1] explicitly asks > clients not to do so. Apparently the internal caches are not updated. > > Otherwise we could do something like this - > for each triple - > SQL> update DB.DBA.RDF_QUAD set G = iri_to_id('newGraph', 0) where S = > iri_to_id( 'subject', 0 ) and P = iri_to_id('predicate', 0) and O = > iri_to_id('object', 0); > > This might result in fewer commands than our current approach. > > [1] http://docs.openlinksw.com/virtuoso/rdfdatarepresentation.html > > -- > Vishesh Handa > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d_______________________________________________ > Virtuoso-users mailing list > Virtuoso-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/virtuoso-users
smime.p7s
Description: S/MIME cryptographic signature
------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________ Virtuoso-users mailing list Virtuoso-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/virtuoso-users