Optimize MySQL Table for Charting
First of all, better to combine both of your structures:


and have PK
and have index for "created"
as a variant, think about a natural PK - created + something which uniquely identifies a row
added - also think about units (system_unit) - if it is identification of your point(?), it may be a good idea to change it to INT format, it reduces memory and disk space usage for this column.


PK could be good for some other queries, and InnoDB still creates it even if you do not define it, but you can not use it in this case.

More importantly, response time depends not only on indexes (of course it MUST HAVE), but also from number of records. You can change the query to:

SELECT count(*) FROM &lt;table_name&gt; WHERE created BETWEEN '2017-01-01' AND '2017-03-13';


and it will show you - how many records the server must return.

The only few ways for feature improvements:


reduce timeframe
reduce number of columns - but this is not your case
faster server - SSD (if still not), increase memory for InnoDB buffer at least (if it is less than necessary)