mysql count()和Max()的优化,子查询,limit



 select count(*),count(id) from tables

count(*) 会查询空行,count(id) 不会查询空行



 

如果payment-_date 没有建立索引

如果创建了索引



 

 
 


 

猜你喜欢

转载自liuguofeng.iteye.com/blog/2124619