title: MySQL create index error
body: <p>Issue is to create index for table 'visits_visit' (Django visit app), because every query lasts at least 60 ms and is going to be worse.</p>
  
  <p><a href="https://i.stack.imgur.com/rikWr.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rikWr.jpg" alt="enter image description here"></a></p>
  
  <pre><code>CREATE INDEX resource ON visits_visit (object_app(200), object_model(200), object_id(200));
  </code></pre>
  
  <p>It returns:</p>
  
  <pre><code>ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes
  </code></pre>
  
  <p>What to do? Structure of table is on the screenshot.</p>