title: Indexing columns in mysql
body: <p>I have a mysql_query . I was wondering which one to index. </p>
  
  <pre><code>SELECT count(*) FROM foo WHERE c=5 GROUP BY d
  </code></pre>
  
  <p>Maybe (c,d) or just c?</p>
  
  <p>I have another similar.</p>
  
  <pre><code>SELECT count(*) FROM foo WHERE d=6 GROUP BY b
  </code></pre>
  
  <p>Maybe (d,b) or just d?</p>
  
  <p>Another one here : </p>
  
  <pre><code>SELECT a FROM foo WHERE b=5 GROUP BY c
  </code></pre>
  
  <p>Here (a,b,c)? </p>
  
  <p>My point is just to make the index which will cover three queries.. The best one here would be? and on which column? </p>