Sebastian Trueg wrote:
Is there a query that would replace one URI with another one in all
graphs? In other words: I need to "rename" one resource and make sure
that all statements in all graphs are updated accordingly.
Currently I am doing that on the client side which is rather slow.
Personally I'd consider:
update rdf_quad
set
s=iri_to_id('http://some/new/thing')
where
s=iri_to_id('http://some/old/thing');
Adjust for ?p and ?o columns to taste.
It touches on potentially many rows in the quad-store, but the iri_to_id()
calls can be optimized to happen only once each and the lookup will be fast
between hash-values.
Beware of caching IRI lookups, however: the above might require a
server-restart to take effect.
HTH,
~Tim
--
Tim Haynes
Product Development Consultant
OpenLink Software
<http://www.openlinksw.com/>
<http://twitter.com/openlink>