optimize mysql count query

后端 未结 10 684
忘了有多久
忘了有多久 2020-12-30 05:54

Is there a way to optimize this further or should I just be satisfied that it takes 9 seconds to count 11M rows ?

devuser@xcmst > mysql --user=user --pass         


        
10条回答
  •  遥遥无期
    2020-12-30 06:13

    There is no primary key in your table. It's possible that in this case it always scans the whole table. Having a primary key is never a bad idea.

提交回复
热议问题