<docbook><section><title>VirtTipsAndTricksQueryOptimizerASSUME</title><para> </para>
<title>How can I use the Virtuoso specific query optimizer hint ASSUME?</title>How can I use the Virtuoso specific query optimizer hint ASSUME?
<para> ASSUME is a Virtuoso specific query optimizer hint for letting know the optimizer that the expression X is always true and the optimizer should work as such where you have ASSUME, while not triggering any SQL code generation for checking whether X is true (since it is ASSUMED to be true).
 Thus, in the example below, it is <emphasis>ASSUMED</emphasis> that ?id is an IRI, so there&#39;s not need for any further type checking further down in the query-optimizer&#39;s processing workflow.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">Usage Example:</bridgehead>
<programlisting>SELECT * 
WHERE 
  { 
    ?s1 &lt;id&gt;     ?id   ;
        geo:lat  ?lat  ;
        geo:long ?long .
    GRAPH ?rdf_view_g
      { 
        ?s2 &lt;id&gt;       ?id    ;
            rdfs:label ?label
      } .
    ASSUME (isIRI (?id)) } 
</programlisting><bridgehead class="http://www.w3.org/1999/xhtml:h2">Related</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtTipsAndTricksGuide">Virtuoso Tips and Tricks Collection</ulink> </listitem>
<listitem><ulink url="http://docs.openlinksw.com/virtuoso/rdfsparql.html">Virtuoso Documentation</ulink> </listitem>
<listitem><ulink url="VirtSPARQLOptGuideEx1">Optimizing query performance using bif functions Example</ulink></listitem>
</itemizedlist></section></docbook>