title: mysql - MyISAM or InnoDB - Join speed vs Lookup speed
body: <p>Read question before closing as duplicate pls., because there are many questions about this, but at least I didn't find what I was looking for.</p>
  
  <p>What is clear by now: </p>
  
  <pre><code> MyIsam is faster at searching strings (much faster)
   InnoDB is faster at joins (much faster)
  </code></pre>
  
  <p>So my problem is this: I have the following setup:</p>
  
  <p>Two tables, lets say t1 having columns <code>id</code>, <code>bla1</code>, <code>bla2</code>, ..., <code>blan</code>; and t2 having columns <code>t1Id</code>, <code>extra1</code>, <code>extra2</code>, ..., <code>extran</code>.</p>
  
  <p>Table 1 (t1) is InnoDB (needs transactions on it so that's clear). Table 2 (t2) is always used with t1 (is extra data for some specific cases), so there will always be a join between those to where ever t2 appears. That would point to InnoDB. The thing is that after the join a search will be also done (always) for a string inside one of the columns. This would point to MyISAM.</p>
  
  <p>Time to get something is obviously the sum between the join time and the search time. The problem is that if I optimize one I make the other slower.</p>
  
  <p>Bonus facts: Tables are really really big, t2 never needs transactions, row lock or whatever usually impose InnoDB.</p>
  
  <p>What is the better choice? MyISAM or InnoDB?</p>