title: How to avoid using a temporary table for this simple query
body: <p>How can I avoid using a temporary table for this query and still accomplishing the same goal?</p>
  
  <pre><code>EXPLAIN EXTENDED 
  SELECT DISTINCT id, view_count
    FROM
        screenshot_udb_affect_assoc
    INNER JOIN
        screenshot ON id = screenshot_id
    WHERE unit_id = 110 LIMIT 0, 6
  
  id  select_type table   type    possible_keys   key key_len ref rows    filtered    Extra
  1   SIMPLE  screenshot_udb_affect_assoc ref screenshot_id,unit_id   unit_id 4   const   34  100.00  Using temporary
  1   SIMPLE  screenshot  eq_ref  PRIMARY PRIMARY 4   source_core.screenshot_udb_affect_assoc.screenshot...   1   100.00
  </code></pre>
  
  <p>I've updated the query to not use <code>RAND()</code> anymore and instead the <code>LIMIT</code> will be randomized via PHP.  Though it still shows that it's using a temporary table</p>