From 2531f62a7abefd13b25d0a6ae3c55685e71075d8 Mon Sep 17 00:00:00 2001 From: bjl23 Date: Thu, 20 Jan 2011 19:26:38 +0000 Subject: [PATCH] modification to collation query to avoid SDB inefficiency - see NIHVIVO-1840 --- webapp/web/config/listViewConfig-default.xml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/webapp/web/config/listViewConfig-default.xml b/webapp/web/config/listViewConfig-default.xml index 446a74a2d..0a63fafa8 100644 --- a/webapp/web/config/listViewConfig-default.xml +++ b/webapp/web/config/listViewConfig-default.xml @@ -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