title: SQL query improvement - MSAccess 2007
body: <p>I have a need to Select all records based on the following SQL:</p>
  
  <pre><code>Select ID, ID2 From Table1 Where ID2 NOT IN (Select ID2 From Table2 Where ID3 IN (151,157))
  </code></pre>
  
  <p>There are 171k records in Table1 and 70k records in Table2 where 'ID3 IN (151,157)'.</p>
  
  <p>Unfortunately, that query takes forever; in fact, I have never seen it complete on a system with 32GB memory and quad I7 processors. I give up and cancel after 30 minutes.</p>
  
  <p>I figure there is an SQL guru or two here that can tell me how to improve this query and get it to complete in under a minute. </p>