title: Does Django ManyToManyField create table with a redundant index?
body: <p>If I have a model <strong>Foo</strong> that has a simple M2M field to model <strong>Bar</strong>:</p>
  
  <pre><code>class Foo(Model):
      bar = ManyToManyField(Bar)
  </code></pre>
  
  <p>Django seems to create a table <strong>foo_bar</strong> which has the following indices:</p>
  
  <pre><code>index 1: primary, unique (id)
  index 2: unique (foo_id, bar_id)
  index 3: non_unique (foo_id)
  index 4: non_unique (bar_id)
  </code></pre>
  
  <p>I recall from my basic knowledge of SQL, that if a query needs to look for conditions on foo_id, index 2 would suffice (since the left-most column can be used for lookup). index 3 seems to be redundant.</p>
  
  <p>Am I correct to assume that index 3 does indeed take up index space while offering no benefit? That I'm better off using a through table and manually create a unique index on (foo_id, bar_id), and optionally, another index on (bar_id) if needed?</p>