title: MySQL indexes - what are the best practices?
body: <p>I've been using indexes on my MySQL databases for a while now but never properly <em>learnt</em> about them. Generally I put an index on any fields that I will be searching or selecting using a <code>WHERE</code> clause but sometimes it doesn't seem so black and white.</p>
  
  <p><strong>What are the best practices for MySQL indexes?</strong></p>
  
  <p>Example situations/dilemmas:</p>
  
  <ul>
  <li><p>If a table has six columns and all of them are searchable, should I index all of them or none of them?</p></li>
  <li><p>What are the negative performance impacts of indexing?</p></li>
  <li><p>If I have a VARCHAR 2500 column which is searchable from parts of my site, should I index it?</p></li>
  </ul>