title: MySQL performance tuning - unique constraints
body: <p>I have a database in MySQL 5.5. I eventually expect to have tens of millions of records in there. </p>
  
  <p>If I add a unique constraint on two columns, I know there will be some performance penalty for inserts; the question is, how much? And what can I do to minimize it?</p>
  
  <p>Would the penalty be different if instead I had the unique constraint on a <em>single</em> column?</p>