I have a table with 1.5M+ rows for recording downloads from a website which has email address of the one who has downloaded something. I want to find those who have downloaded more than 100 times. This is what I have tested but the query-time
is more than 11 seconds when I test it on the server! Do you know any faster way?
SELECT `email`
FROM `table_of_downloads`
GROUP BY `email`
HAVING COUNT( * ) >100
Here is the EXPLAIN results as requested:
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE table_of_downloads ALL NULL NULL NULL NULL 1656546 Using temporary; Using filesort