title: Does Oracle use short-circuit evaluation?
body: <p>I have an Oracle query that is structured as followed:</p>
  
  <pre><code>SELECT   *
  FROM     table
  WHERE    X='true' OR
           Y IN (complicated subquery)
  </code></pre>
  
  <p>If Oracle sees that X does equal 'true' will it still try to evaluate the Y IN (subquery) part of the WHERE clause? Also, in a statement such as this would the subquery be executed multiple times for each entry in the table? Would I be better off with something like:</p>
  
  <pre><code>WITH subQ as (complicated subquery)
  SELECT   *
  FROM     table
  WHERE    X='true' OR
           Y IN (SELECT id FROM subQ)
  </code></pre>