What is differentcount(*),count(1),count(column)
总结一下他们,实验过程不记录了,直接结论了。
count(*)
count(1)
count(column)
不同点:
count(*)
count(1)
统计包含null值;如果有索引的话,必须保证索引列没有null值才会走索引;
count(column)
统计不包含null值;索引列是否有null值都不会影响走索引 ;因为统计的时候就已经把null值排除了;
相同点:
count(*)
count(1)
tom说他们是相同的
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::NO::P11_QUESTION_ID:1156159920245