title: MySQL Indexing, Different types and when to use them?
body: <p>Ok, So I have (re)searched a lot regarding MySQL Indexes and their importance and I understand i have to use it to make database queries run faster.,</p>
  
  <p>And i know the syntax to add index on any filed.</p>
  
  <p>But here's what i don't understand, ( I am using Heidi SQL to manage database locally )</p>
  
  <p>I have a table with the following fields</p>
  
  <pre><code>id
  company_id
  author_id
  client_id
  project_id
  title
  description
  status
  date
  </code></pre>
  
  <p>Here, <code>id</code> is the <code>primary key</code>, <code>auto incremented</code> and is already <code>indexed</code>.</p>
  
  <p>I want to add an index on <code>company_id</code>, <code>author_id</code>, <code>client_id</code>, <code>project_id</code>, But i have few different options here (Heidi SQL: select field, right click, create new index ) <code>Key</code>, <code>Unique</code>, <code>Full Text</code>, <code>Spatial</code></p>
  
  <p>I know (guess) <code>Key</code> will just index the field, <code>Unique</code> will make sure that the field has to be unique and <code>Full Text</code> index will be best if i plan to perform search on that field.</p>
  
  <p><code>Question 1</code> : What does <code>Spatial</code> do, where and when should i use this index.</p>
  
  <p><code>Question 2</code> : While creating and index, I have 2 options, Either create a new index or Add to an already existing index (like the name of primary field).</p>
  
  <p>What's the difference between creating a new index OR adding to an already existing index? Is creating an index under different name for every different field i index a good idea or should i create/add all the indexes under the same name.</p>
  
  <p>Thanks for you time.</p>