I have a sql.
select count(id) as total, DATE_FORMAT(create_time,"%Y-%m-%d") as create_date
from table_name
group by DATE_FORMAT(create_time,"%Y-%m-%d");
Then Definition of column create_time.
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
As far as I know, the function DATE_FORMAT does not take the index, so my execution speed is very slow. Is there any way to optimize it?
mysql version:5.6.34