Wrong
通常,count(*)和count(1)的计算结果一致。若有主键,count(主键)的运行效率最快;若无主键,count(1)比count(*)运行效率要快。若整个表只有一个行,count()的运行效率最快;若多于一个行时,count(1)要比count()运行效率快。因为count(*)会扫描整个表。
https://www.jianshu.com/p/84379d16e9b2
Right to MySQL8.x
InnoDB handles SELECT COUNT(*) and SELECT COUNT(1) operations in the same way. There is
no performance difference.
For MyISAM tables, COUNT(*) is optimized to return very quickly if the SELECT retrieves from one
table, no other columns are retrieved, and there is no WHERE clause.
This optimization only applies to MyISAM tables, because an exact row count is stored for
this storage engine and can be accessed very quickly. COUNT(1) is only subject to the same
optimization if the first column is defined as NOT NULL.