How to speed up select count(*) with group by? It\'s too slow and is used very frequently. I have a big trouble using select count(*)
select count(*)
group by
I would suggest to archive data unless there is any specific reason to keep it in the database or you could partition the data and run queries separately.