title: Implicit column index
body: <p>Given the following MySQL table (InnoDB type):</p>
  
  <pre><code>CREATE TABLE `table` (
    `id`      INT     NOT NULL,
    `foo_id`  INT     NOT NULL,
    `bar_id`  INT     NOT NULL,
    `name`    VARCHAR NOT NULL,
  
    PRIMARY KEY (`id`),
  
    INDEX   `on_foo_id` (`foo_id`),
    INDEX   `on_bar_id` (`bar_id`),
  
    UNIQUE  `on_foo_bar_id` (`btl_foo_id`, `btl_bar_id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  </code></pre>
  
  <p>Note: even if I'm not using MySQL FOREIGN KEY constraints (I'm a Rails developer who handle this on the applicative level), the columns <code>foo_id</code> &amp; <code>bar_id</code> are foreign keys.</p>
  
  <p>Due to the presence of:</p>
  
  <ol>
  <li><code>bar_id</code>'s index</li>
  <li>(<code>foo_id</code>, <code>bar_id</code>)'s index</li>
  </ol>
  
  <p>...I'm wondering if the index on <code>foo_id</code> is really relevant. Maybe MySQL may already index <code>foo_id</code> even without explicitly declare this column as an index.</p>
  
  <p>In other words, is it possible to remove this line:</p>
  
  <pre><code>INDEX   `on_foo_id` (`foo_id`),
  </code></pre>
  
  <p>without altering the performances?</p>
  
  <p>Thank you for the light.</p>