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