title: MySQL how to join tables on two fields
body: <p>I have two tables with <code>date</code> and <code>id</code> fields. I want to join on both fields.  I tried </p>
  
  <pre><code>JOIN t2 ON CONCAT(t1.id, t1.date)=CONCAT(t2.id, t2.date)
  </code></pre>
  
  <p>that works, but it is very slow. is there a better way to do this?</p>