title: SQL filter LEFT TABLE before left join
body: <p>I have read a number of posts from SO and I understand the differences between filtering in the where clause and on clause. But most of those examples are filtering on the RIGHT table (when using left join). If I have a query such as below:</p>
  
  <pre><code>select * from tableA A left join tableB B on A.ID = B.ID and A.ID = 20
  </code></pre>
  
  <p>The return values are not what I expected. I would have thought it first filters the left table and fetches only rows with ID = 20 and then do a left join with tableB.</p>
  
  <p>Of course, this should be technically the same as doing: </p>
  
  <pre><code>select * from tableA A left join table B on A.ID = B.ID where A.ID = 20
  </code></pre>
  
  <p>But I thought the performance would be better if you could filter the table before doing a join. Can someone enlighten me on how this SQL is processed and help me understand this thoroughly.</p>