title: Update statement using IN clause issue
body: <p>I have an update statement that goes thus:</p>
  
  <pre><code>update tableA 
      set val1='X', val2='Y' 
  
  where id in (
      select id from tableA A 
  
      LEFT JOIN tableB B ON A.col1=B.col1 and A.col2=B.col2 
  
      where A.col3='xx' and B.col3= 'YY')
  </code></pre>
  
  <p>Now, the inner SELECT statement runs in 10 minutes returning 1000 records (both tableA and tableB have about 10mil records each)</p>
  
  <p>The whole update statement runs for 3 hours ( have not waited yet for completion)</p>
  
  <p>Any ideas?</p>