select count(*) 与select count(id) 区别

select count(*)  与select count(id) 区别,

1.速度差不了多少,全表扫,,count(id)它会对id进行非空判断。。 所以时间与count(*)差不多

 

select * from table where 1=1 ;

 

 

select * from table where 1;

posted @ 2020-09-10 11:01  A汉克先生  阅读(1314)  评论(0编辑  收藏  举报