title: Avoid temp table with group by on multiple columns from different table
body: <p>Is it possible to create an index such that a temp table is not created where the group by is grouping on two or more columns from different tables?</p>
  
  <p>Example:</p>
  
  <pre><code>SELECT T1.c1, T2.c2, COUNT(*)
  FROM T1
  JOIN T2 USING (pk)
  WHERE
   T1.c3 = 100
  GROUP BY T1.c1, T2.c2
  </code></pre>
  
  <p>What would be the combination of index'es that I could use so that a temp table is not created?</p>