i have this query :
SELECT date(DATE_SAISIE) , count(DATE_SAISIE) as total FROM appel_offre GROUP BY date(DATE_SAISIE) ORDER BY DATE_SAISIE I have index on DATE_SAISIE
create index mi_date on appel_offre(DATE_SAISIE) and this is explain cmd :
+----+-------------+-------------+-------+---------------+---------+---------+------+------+----------------------------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------------+-------+---------------+---------+---------+------+------+----------------------------------------------+ | 1 | SIMPLE | appel_offre | index | mi_date | mi_date | 6 | NULL | 25 | Using index; Using temporary; Using filesort | +----+-------------+-------------+-------+---------------+---------+---------+------+------+----------------------------------------------+ in the column extra there is Using temporary; Using filesort so I think the query will be slow, How to avoid it ?
mi_date