title: SQL: Partition by Column Value
body: <p>I have a MySQL table with 20 million rows. Querying this database is taking too much time. The database is in the format below:</p>
  
  <pre><code>Column    Column   Column   Sector
  
  data      data     data     Retail
  data      data     data     Utility
  data      data     data     Retail
  data      data     data     Insurance
  data      data     data     Retail
  data      data     data     Agriculture
  data      data     data     Agriculture
  data      data     data     Retail
  </code></pre>
  
  <p>I want to be able to partition the database by sector. This should boost speed for queries where the sector is specified. I have tried the following and it does not work. Where am I going wrong?</p>
  
  <pre><code>Alter table 'technical' partition by values in `sector`
  </code></pre>