title: Where inside JOIN ON clause?
body: <p>If I have the following tables:</p>
  
  <p>table_a</p>
  
  <pre><code>id   |   name  |tbl_b_key| status
  -----+---------+---------+--------
  0    |    a    |    1    |    0
  1    |    b    |    2    |    0
  2    |    c    |    3    |    1
  </code></pre>
  
  <p>table_b</p>
  
  <pre><code>id   |  type   | status
  -----+---------+---------
  0    |    a    |    0
  1    |    b    |    0
  2    |    b    |    1
  3    |    a    |    1
  </code></pre>
  
  <p>Is there any difference in terms of performance between these two queries?</p>
  
  <pre><code>SELECT table_a.name, table_b.type FROM table_a JOIN table_b ON (table_a.status = table_b.status AND table_b.type = a);
  
  SELECT table_a.name, table_b.type FROM table_a JOIN table_b ON (table_a.status = table_b.status) WHERE table_b.type = a;
  </code></pre>
  
  <p>My understanding is the first query would be faster, as it first reduces the amount of rows being joined whereas the second query does the join then performs the where. Or is there no real difference between the two?</p>
  
  <p>EDIT: As pointed out I made a mistake in my first query, fixed now.</p>