title: Two single-column indexes vs one two-column index in MySQL?
body: <p>I'm faced with the following and I'm not sure what's best practice.</p>
  
  <p>Consider the following table (which will get large):</p>
  
  <p>id PK | giver_id FK | recipient_id FK | date</p>
  
  <p>I'm using InnoDB and from what I understand, it creates indices automatically for the two foreign key columns. However, I'll also be doing lots of queries where I need to match a particular combination of: </p>
  
  <p><code>SELECT...WHERE giver_id = x AND recipient_id = t</code>.</p>
  
  <p>Each such combination will be unique in the table.</p>
  
  <p>Is there any benefit from adding an two-column index over these columns, or would the two individual indexes in theory be sufficient / the same?</p>