2 Replies Latest reply on Jul 28, 2016 4:34 PM by 3054700

    SEM_MATCH options

    3054700

      Hi,

       

      In Oracle Spatial and Graph RDF Semantic Graph Developer's Guide (12c), documentation mentions a set of available options for SEM_MATCH function (1.6 Using the SEM_MATCH Table Function to Query Semantic Data).

       

      In chapter RDF Semantic Graph Support for Apache Jena, documentation says "Additional query options can be passed to a SEM_MATCH query including a line in the following form..." and shows a different set of options (some are in both chapters but most don't).

       

      I'm interested in using (at least testing) options like DOP=n, BEST_EFFORT_QUERY=t, TIMEOUT=n (all documented in Jena chapter). Are they supported directly in SEM_MATCH (we don't use Jena so far)? For example TIMEOUT=1 doesn't seem to work...


      How to check that the options were actually effective?


      Thank in advance

      Fred

        • 1. Re: SEM_MATCH options
          Matperry-Oracle

          Hi Fred,

           

          Jena Adapter query hints do not work with SEM_MATCH. Only the hints documented in Section 1.6 are supported for SEM_MATCH.

           

          Sorry about the confusion in the docs. Jena Adapter does effectively "push" those other hints to SEM_MATCH but the hints generated for SEM_MATCH use a different syntax than the Jena specification. The ones you specifically mention (DOP, BEST_EFFORT_QUERY, and TIMEOUT) do not have equivalent SEM_MATCH hints because these hints are used to control additional logic on the Jena Adapter side that influence SQL execution.

           

          You can influence DOP and ODS with a plain SQL hint in the SQL that contains SEM_MATCH. For example:

           

          SELECT /*+ parallel(8) dynamic_sampling(6) */ x

          FROM TABLE(SEM_MATCH(...));

           

          BEST_EFFORT_QUERY and TIMEOUT are not available, but there are a variety of ways to kill a long running query (e.g., with Ctrl-C or from Enterprise Manager).

           

          Hope that helps,

          Matt

          1 person found this helpful
          • 2. Re: SEM_MATCH options
            3054700

            Thank you for these details Matt.

             

            In Jena, BEST_EFFORT_QUERY=t, when used with the TIMEOUT=n option, is said to return all matches found in n seconds for the SPARQL query. It is not clear for me how to achieve the same behavior with a SEM_MATCH executed via oracle.jdbc.driver.OracleDriver (returning all matches already found and not only killing the query).

             

            Any idea?

             

            Fred