Select Count (*)和Select Count(1)以及Select Count(column)的区别
2013-12-18 16:40
615 查看
一般情况下,两着返回结果是一样的
假如表沒有主键(Primary key), 那么count(1)比count(*)快如果有主键的話,那主键作为count的条件时候count(主键)最快
如果你的表只有一个字段的话那count(*)就是最快的
count(*) 跟 count(1) 的结果一样,都包括对NULL的统计
count(column) 是不包括NULL的统计
相关文章推荐
- Select Count (*)和Select Count(1)以及Select Count(column)的区别
- Select Count (*)和Select Count(1)以及Select Count(column)区别
- Select Count (*)和Select Count(1)以及Select Count(column)区别
- select count()和select count(1)的区别
- select count(*)和select count(1)的区别
- Count (*),Select Count(1),Select Count(column)的区别
- select count (*)、count(1)、count(column)的区别
- select count(*)和select count(1)的区别(转载)
- select count(*)和select count(1)的区别
- select count(*)和select count(1)的区别和效率差异
- 查询数量 简单分析count(1) count(*)以及count(column)的区别
- select count(*)和select count(1)的区别 .
- select count(*)和select count(1)的区别
- select count(*) from temp 与select count(1) from temp有什么区别
- select count(*)和select count(1)的区别
- 关于使用count(X) 函数的说明(附加:关于null的说明以及和0的区别)
- select count(*)和select count(1)的区别
- select count(*) 与 select count(1)区别?
- Select count(*)和Count(1)的区别和执行方式
- mysql count(*),count(1)与count(column)区别