Hey all, I’m trying to run a query to find the path to the root concept of a graph. The entries are defined as rdfs:subClassOf
Currently I’m using PREFIX skos: <http://www.w3.org/2004/02/skos/core# <http://www.w3.org/2004/02/skos/core#>> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema# <http://www.w3.org/2000/01/rdf-schema#>> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns# <http://www.w3.org/1999/02/22-rdf-syntax-ns#>> SELECT ?parent ?label WHERE { GRAPH ?g { ?concept rdfs:subClassOf* ?parent }} However on a moderately sized data set < 1M triples, this query sometimes takes /minutes/. I suspect it has to do with the disk-based TDB (since I hear my HDD spin a lot), but still. Is there a way to optimise this query, maybe by using a different reasoner? And if so how would that reasoner be used! Thanks in advance, Joël
