From: Michael S. <ms...@me...> - 2015-03-11 17:30:37
|
Jim, first of all, I’d agree that the two queries are equivalent (unless I’m missing some typo here). We’ve recently worked on improvements related to the evaluation of arbitrary length path operators (in your case: the transitive closure calculation over subClassOf), see http://trac.bigdata.com/ticket/1003 <http://trac.bigdata.com/ticket/1003>. The fix there may help in terms of performance for both of your queries — as you may have noticed from previous discussions, we’re currently preparing the next release (planned for the end of the week), which will include this fix. We’d be happy to get your feedback whether this fixes the memory/performance of your query once the release is out. Regarding the problem with the update having no effect: would you mind sharing your curl call? Is your request following the guidelines documented at http://wiki.bigdata.com/wiki/index.php/NanoSparqlServer#UPDATE_.28SPARQL_1.1_UPDATE.29 <http://wiki.bigdata.com/wiki/index.php/NanoSparqlServer#UPDATE_.28SPARQL_1.1_UPDATE.29>? Best, Michael > On 11 Mar 2015, at 17:37, Jim Balhoff <ba...@ne...> wrote: > > Hi, > > I am having a confusing issue with SPARQL update and wanted to verify my expectations. Submitting this update using curl returns immediately and reports 0 mutations: > > PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> > PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> > PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> > PREFIX owl: <http://www.w3.org/2002/07/owl#> > PREFIX dc: <http://purl.org/dc/elements/1.1/> > PREFIX ps: <http://purl.org/phenoscape/vocab.owl#> > PREFIX obo: <http://purl.obolibrary.org/obo/> > WITH <http://kb.phenoscape.org/ic> > INSERT { > ?annotation ps:reflexive_subClassOf ?subsumer . > } > WHERE { > ?term ps:has_phenotypic_profile/rdf:type ?annotation . > ?annotation rdfs:subClassOf* ?subsumer . > FILTER(isIRI(?subsumer)) > } > > If I change the query into a SELECT using the same WHERE clause, I get many results. If I edit the update to put the WHERE contents into a subquery, it no longer returns immediately. It seems to getting results, but I am not sure because it eventually runs out of memory before completing. This is the modified update with subquery: > > PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> > PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> > PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> > PREFIX owl: <http://www.w3.org/2002/07/owl#> > PREFIX dc: <http://purl.org/dc/elements/1.1/> > PREFIX ps: <http://purl.org/phenoscape/vocab.owl#> > PREFIX obo: <http://purl.obolibrary.org/obo/> > WITH <http://kb.phenoscape.org/ic> > INSERT { > ?annotation ps:reflexive_subClassOf ?subsumer . > } > WHERE { > SELECT DISTINCT ?annotation ?subsumer WHERE { > ?term ps:has_phenotypic_profile/rdf:type ?annotation . > ?annotation rdfs:subClassOf* ?subsumer . > FILTER(isIRI(?subsumer)) > } > } > > Should these two queries have the same results? If I am getting no data inserted in the first case, might I be hitting a bug? Based on a SELECT query, the WHERE clause definitely matches content in the database. > > Thank you, > Jim > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for all > things parallel software development, from weekly thought leadership blogs to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Bigdata-developers mailing list > Big...@li... > https://lists.sourceforge.net/lists/listinfo/bigdata-developers |