My Oracle Support Banner

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

Last updated on JANUARY 30, 2022

Applies to:

Oracle Spatial and Graph - Version and later
Information in this document applies to any platform.


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 because UNION was not
supported at that time, so queries with many OPTIONALS will have
slower performance on 11.2.


To view full details, sign in with your My Oracle Support account.

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

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.