I have a statistics table with about 400k rows stored, each row is a hit, im trying to run a few different queries but they take hours to run, here is one of them ...
SQL
SELECT COUNT(*) AS vists FROM ( SELECT * FROM `statistics` GROUP BY `stat_ip` ) AS data
.. is there a better way i can do this ?