mysql count 慢的优化(使用二级索引)

发现了mysql innodb count统计特别慢(不管count(1)仍是count(*)),总结一下优化mysql 通常采用二级索引去count: 好比:id 是pk aid是secondary index 采用web select count(*) from table where id >=0; 跟sql select count(*) from table; 效果是同样的,都是默认使用
相关文章
相关标签/搜索