当前位置:Gxlcms > 数据库问题 > mysql count的理解

mysql count的理解

时间:2021-07-01 10:21:17 帮助过:15人阅读

mysql count的理解

1 select count(tel) as telcount from info;
如果tel列有null 将不会被统计进去

2 count(*) 这样写性能更好

3 MYISAM引擎 只有当没有where的时候 count(*) 查询才会达到神一样的速度!!
看下面例子就知道了
EXPLAIN SELECT count(id) FROM `grs_record_login`
row竟然没有值

mysql count的理解

标签:没有   引擎   sele   exp   log   explain   统计   将不   myisam   

人气教程排行