modification to collation query to avoid SDB inefficiency - see NIHVIVO-1840

This commit is contained in:
bjl23 2011-01-20 19:26:38 +00:00
parent 8019766830
commit 2531f62a7a

View file

@ -22,12 +22,17 @@
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?subclass ?object ?name ?moniker {
GRAPH ?g1 { ?subject ?property ?object }
GRAPH ?g1 { ?subject ?property ?object
OPTIONAL { ?object a ?subclass }
# TODO: the original intent was to allow the
# type triple to be in a different graph,
# but SDB makes an extremely inefficient
# query with this additional graph variable.
}
OPTIONAL { GRAPH ?g2 { ?object rdfs:label ?name } }
OPTIONAL { GRAPH ?g3 { ?object vitro:moniker ?moniker } }
OPTIONAL { GRAPH ?g4 { ?object a ?subclass }
FILTER (?g4 != <http://vitro.mannlib.cornell.edu/default/inferred-tbox> &&
?g4 != <http://vitro.mannlib.cornell.edu/default/vitro-kb-inf> )
FILTER (?g1 != <http://vitro.mannlib.cornell.edu/default/inferred-tbox> &&
?g1 != <http://vitro.mannlib.cornell.edu/default/vitro-kb-inf> )
}
} ORDER BY ?subclass
</query-collated>