How to speed up “select count(*)” with “group by” and “where”?

后端 未结 9 545
北恋
北恋 2020-12-07 10:28

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(*)

9条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-07 10:55

    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.

提交回复
热议问题