From: Vishesh H. <me...@vh...> - 2012-12-07 18:44:43
|
On Fri, Dec 7, 2012 at 11:09 PM, Kingsley Idehen <ki...@op...>wrote: > SPARQL 1.1 Update language includes DELETE option :-) Thanks. I managed. I had been trying "sparql insert { .. } delete { .. }". The correct syntax was "sparql delete { .. } insert { .. }". I am a little concerned about the execution time. Preliminary (read really stupid) tests show a lot of difference - SQL> sparql delete { graph <nepomuk:/ctx/e6990720-8f63-45e2-9bc7-3fe8d3a67835> { <nepomuk:/res/4596e939-dfbd-4d9f-8406-7a546fde8980> < http://nepomuk.kde.org/ontologies/2010/11/29/kext#unixFileMode> "33188"^^< http://www.w3.org/2001/XMLSchema#int> .} } insert { graph <nepomuk:/ctx/4beb2f29-852d-467c-b22e-f2b34df8197b> { <nepomuk:/res/4596e939-dfbd-4d9f-8406-7a546fde8980> < http://nepomuk.kde.org/ontologies/2010/11/29/kext#unixFileMode> "33188"^^< http://www.w3.org/2001/XMLSchema#int> . } }; Done. -- 20 msec. SQL> SQL> SQL> sparql select ?g where { graph ?g { <nepomuk:/res/4596e939-dfbd-4d9f-8406-7a546fde8980> < http://nepomuk.kde.org/ontologies/2010/11/29/kext#unixFileMode> "33188"^^< http://www.w3.org/2001/XMLSchema#int> . } }; g VARCHAR _______________________________________________________________________________ nepomuk:/ctx/4beb2f29-852d-467c-b22e-f2b34df8197b 1 Rows. -- 1 msec. SQL> sparql insert { graph <nepomuk:/ctx/e6990720-8f63-45e2-9bc7-3fe8d3a67835> { <nepomuk:/res/4596e939-dfbd-4d9f-8406-7a546fde8980> < http://nepomuk.kde.org/ontologies/2010/11/29/kext#unixFileMode> "33188"^^< http://www.w3.org/2001/XMLSchema#int> . } }; Done. -- 2 msec. SQL> SQL> sparql delete { graph <nepomuk:/ctx/4beb2f29-852d-467c-b22e-f2b34df8197b> { <nepomuk:/res/4596e939-dfbd-4d9f-8406-7a546fde8980> < http://nepomuk.kde.org/ontologies/2010/11/29/kext#unixFileMode> "33188"^^< http://www.w3.org/2001/XMLSchema#int> .} } Type the rest of statement, end with a semicolon (;)> ; Done. -- 2 msec. A combined delete + insert took around 20msec. When separate delete + insert statements took 2 msecs each. Anyway, I'll run some proper tests on a large data set and compare the actual benchmarks to see if there is any difference. Thank you, for your help. -- Vishesh Handa |