The difference between count (1), count (*), count (field)

count(1)和count(*):

All statistics are the number of records, including null

The efficiency: the amount of data when less when using 1W + time count (*), less (1) with a count less than 1w

count (field):

The number of rows statistical field column, excluding null

If the maximum count is the primary key field (the primary key) efficiency, otherwise the count (. 1) when small amounts of data

 

Summary: a small amount of data is not null ignored the election count (1), a large number of data strobe count (*), ignored the election null count (field)

Guess you like

Origin www.cnblogs.com/cn-chy-com/p/11221210.html
Recommended