modification to collation query to avoid SDB inefficiency - see NIHVIVO-1840
This commit is contained in:
parent
8019766830
commit
2531f62a7a
1 changed files with 9 additions and 4 deletions
|
@ -22,12 +22,17 @@
|
||||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
|
|
||||||
SELECT ?subclass ?object ?name ?moniker {
|
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 ?g2 { ?object rdfs:label ?name } }
|
||||||
OPTIONAL { GRAPH ?g3 { ?object vitro:moniker ?moniker } }
|
OPTIONAL { GRAPH ?g3 { ?object vitro:moniker ?moniker } }
|
||||||
OPTIONAL { GRAPH ?g4 { ?object a ?subclass }
|
FILTER (?g1 != <http://vitro.mannlib.cornell.edu/default/inferred-tbox> &&
|
||||||
FILTER (?g4 != <http://vitro.mannlib.cornell.edu/default/inferred-tbox> &&
|
?g1 != <http://vitro.mannlib.cornell.edu/default/vitro-kb-inf> )
|
||||||
?g4 != <http://vitro.mannlib.cornell.edu/default/vitro-kb-inf> )
|
|
||||||
}
|
}
|
||||||
} ORDER BY ?subclass
|
} ORDER BY ?subclass
|
||||||
</query-collated>
|
</query-collated>
|
||||||
|
|
Loading…
Add table
Reference in a new issue