<html>
<head>
    <base href="https://docs.jboss.org/author">
            <link rel="stylesheet" href="/author/s/en/2172/19/5/_/styles/combined.css?spaceKey=TEIID&amp;forWysiwyg=true" type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://docs.jboss.org/author/display/TEIID/OPTION+Clause">OPTION Clause</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://docs.jboss.org/author/display/~shawkins">Steven Hawkins</a>
    </h4>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >{info:title=Info}Previous versions of Teiid accepted the PLANONLY, DEBUG, and SHOWPLAN option arguments.  These are no longer accepted in the OPTION clause. Please see the Client Developers Guide for replacements to those options. <br>{info} <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;"> <br>{note}MAKEDEP and MAKENOTDEP hints may take table names in the form of @view1.view2...table.  For example with an inline view &quot;select * from (select * from tbl1, tbl2 where tbl1.c1 = tbl2.c2) as v1 option makedep @v1.tbl1&quot; the hint will now be understood as applying under the v1 view.{note} <br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <p>The OPTION keyword denotes options the user can pass in with the command. These options are Teiid specific and not covered by any SQL specification.</p>

<p>Usage:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: sql; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">OPTION option (, option)*</pre>
</div></div>

<p>Supported options:</p>

<ul>
        <li>MAKEDEP table (,table)* - specifies source tables that should be made dependent in the join</li>
</ul>


<ul>
        <li>MAKENOTDEP table (,table)* - prevents a dependent join from being used</li>
</ul>


<ul>
        <li>NOCACHE [table (,table)*] - prevents cache from being used for all tables or for the given tables</li>
</ul>


<p>Examples:</p>

<ul>
        <li>OPTION MAKEDEP table1</li>
</ul>


<ul>
        <li>OPTION NOCACHE</li>
</ul>


<p>All tables specified in the OPTION clause should be fully qualified, however the name may match either an alias name or the fully qualified name.</p>


<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/author/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Info</b><br />Previous versions of Teiid accepted the PLANONLY, DEBUG, and SHOWPLAN option arguments.  These are no longer accepted in the OPTION clause. Please see the Client Developers Guide for replacements to those options.</td></tr></table></div>

<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/author/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>MAKEDEP and MAKENOTDEP hints may take table names in the form of @view1.view2...table.  For example with an inline view "select * from (select * from tbl1, tbl2 where tbl1.c1 = tbl2.c2) as v1 option makedep @v1.tbl1" the hint will now be understood as applying under the v1 view.</td></tr></table></div>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;" class="grey">
                        <a href="https://docs.jboss.org/author/users/removespacenotification.action?spaceKey=TEIID">Stop watching space</a>
            <span style="padding: 0px 5px;">|</span>
                <a href="https://docs.jboss.org/author/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
        <a href="https://docs.jboss.org/author/display/TEIID/OPTION+Clause">View Online</a>
        |
        <a href="https://docs.jboss.org/author/pages/diffpagesbyversion.action?pageId=18646234&revisedVersion=6&originalVersion=5">View Changes</a>
                |
        <a href="https://docs.jboss.org/author/display/TEIID/OPTION+Clause?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>