title: Which MySQL JOIN query is more efficient?
body: <p>Given the following table structure:</p>
  
  <pre><code>CREATE TABLE user (
     uid INT(11) auto_increment,
     name VARCHAR(200),
     PRIMARY KEY(uid)
  );
  CREATE TABLE user_profile(
     uid INT(11),
     address VARCHAR(200),
     PRIMARY KEY(uid),
     INDEX(address)
  );
  </code></pre>
  
  <p>Which join query is more efficient: #1,</p>
  
  <pre><code>SELECT u.name FROM user u INNER JOIN user_profile p ON u.uid = p.uid WHERE p.address = 'some constant'
  </code></pre>
  
  <p>or #2:</p>
  
  <pre><code>SELECT u.name FROM user u INNER JOIN (SELECT uid FROM user_profile WHERE p.address = 'some constant') p ON u.uid = p.uid
  </code></pre>
  
  <p>How much is the difference in efficiency?</p>