title: Signifiant difference in Speed of SQL with join, vs without?
body: <p>I'm using ADO in VB6 to access a table in a Microsoft access database that has approximately 320,000 records.</p>
  
  <p>The following SQL (note no join) takes approximately 3 hundredths of a second to execute. The result being 492 records of the 320,000 in that table!</p>
  
  <pre><code>Select * 
  From AvailabilityBlocks 
  Where [Begin] &gt; #02-Oct-2013 12:00:00 AM# AND 
        (AvailabilityBlocks.Type = 2 OR 
        AvailabilityBlocks.Type = 3 OR 
        AvailabilityBlocks.Type=4) 
  AND ResourceID = 59 
  ORDER By [Begin], [End]
  </code></pre>
  
  <p>However, the following SQL takes about 11 seconds to run. The result being 363 of the 320k records.</p>
  
  <pre><code>Select * 
  From AvailabilityBlocks 
  LEFT JOIN Location 
      ON Availabilityblocks.LocationID=Location.LocationID 
  Where [Begin] &gt; #02-Oct-2013 12:00:00 AM# AND 
           (AvailabilityBlocks.Type = 2 OR 
           AvailabilityBlocks.Type = 3 OR 
           AvailabilityBlocks.Type=4) AND 
       (SubType=3 and AvailableForSPs=True) AND 
       ResourceID = 59 
       ORDER By [Begin], [End]        
  </code></pre>
  
  <p>There must be a logical simple explanation for this, am I missing something totally obvious?</p>
  
  <p>Thanks in advance!</p>