title: Slow query selecting 13,000 rows from mysql database
body: <p>I need to select certain rows from a mysql table that has VARCHAR Primary Key index ID.</p>
  
  <p>I therefore use a query (but obviously 13,000 ids instead of 3)</p>
  
  <pre><code>SELECT * FROM table1 WHERE ID IN ('id1928383','id3838339','id38383')
  </code></pre>
  
  <p>For the majority of tables this works well (~0.2s) but for some tables the query takes much longer (~10-11s). </p>
  
  <p>The only thing different about the tables that do not work is they have a larger Data_length? Any ideas how I can speed up the slow query's?</p>