Semantic Query Performance Issues After Upgrading To 11gR2 (Doc ID 960393.1)

Last updated on FEBRUARY 08, 2017

Applies to:

Oracle Spatial - Version 11.2.0.1.0 and later
Information in this document applies to any platform.
***Checked for relevance on 26-Apr-2013***

Symptoms

For SPARQL queries that have a UNION inside an optional e.g.

{ ?x :p1 ?y OPTIONAL {{?y :p2 ?a} UNION {?z :p3 ?b}} }

an ' OR rhsBGP.var IS NULL ' condition must be added to the outer
join condition for each optional join variable

(e.g. 'BGP1.Y = BGP2.Y OR BGP2.Y IS NULL').

This join condition was added for all outer joins whether or not
a union was involved because the extra join condition did not affect
the correctness of the query. However, the 'OR BGP2.Y IS NULL'
condition has a significant negative impact on performance.

The extra join condition should not be used unless a UNION is actually
present in the OPTIONAL graph pattern.

This extra join condition did not appear in 11.1.0.7 because UNION was not
supported at that time, so 11.1.0.7 queries with many OPTIONALS will have
slower performance on 11.2.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms