... |
{code} |
* The system property *org.teiid.subqueryUnnestDefault* controls whether the optimizer will by default unnest subqueries during rewrite. The default is false, since costing information is not consulted. If true, then most non-negated WHERE or HAVING clause EXISTS or IN subquery predicates can be converted to a traditional join. |
* The planner will always convert to antijoin or semijoin variants if costing is favorable. Use a hint to override this behavior needed. |
... |
SELECT col1 from tbl where col2 IN /*+ MJ*/ (SELECT col1 FROM tbl2)
SELECT col1 from tbl where col2 IN /*+ DJ */ (SELECT col1 FROM tbl2)
SELECT col1 from tbl where col2 IN /*+ NO_UNNEST */ (SELECT col1 FROM tbl2)