title: How does Indexes work with MySql partitioned table
body: <p>I have a table which contains information about time, So the table has columns like year, month, day, hour and so on.<br>
  Table has data across years and quite big so i decided to make partition on this table and started learning about Mysql partitioning but caught up by few questions.<br>
  I will really appreciate, if someone can help me understand how partition and indexes will work together.  </p>
  
  <ol>
  <li>If i create partition over year column and also have an index on the same column, how partition and index will work together? How it will impact the performance over, if i had index on year column only and table has no partition?  </li>
  </ol>
  
  <p>Ex. Sql: <code>Select month, day, hour ... from time_table where year = '2017';</code>  </p>
  
  <ol start="2">
  <li>If table has partition over year column and query is filtering records over month column and month column is indexed. How index over month and partition over year will impact the select performance.  </li>
  </ol>
  
  <p>Ex Sql: <code>Select year, month, day .... from time_table where month = '05';</code></p>