title: Multiple and single indexes
body: <p>I'm kinda ashamed of asking this since I've been working with MySQL for years, but oh well.</p>
  
  <p>I have a table with two fields, <code>a</code> and <code>b</code>. I will be running the following queries on it:</p>
  
  <ul>
  <li><code>SELECT * FROM ... WHERE A = 1;</code></li>
  <li><code>SELECT * FROM ... WHERE B = 1;</code></li>
  <li><code>SELECT * FROM ... WHERE A = 1 AND B = 1;</code></li>
  </ul>
  
  <p>From the performance point of view, <strong>is at least one of the following configurations of indexes slower for at least one query</strong>? If yes, please elaborate.</p>
  
  <ol>
  <li><code>ALTER TABLE ... ADD INDEX (a); ALTER TABLE ... ADD INDEX (b);</code></li>
  <li><code>ALTER TABLE ... ADD INDEX (a, b);</code></li>
  <li><code>ALTER TABLE ... ADD INDEX (a); ALTER TABLE ... ADD INDEX (b); ALTER TABLE ... ADD INDEX (a, b);</code></li>
  </ol>
  
  <p>Thanks (note that we are talking about non unique indexes)</p>