Tagged articles
1 articles
Page 1 of 1
Programmer DD
Programmer DD
Sep 13, 2021 · Databases

COUNT(*), COUNT(1) or COUNT(column) in MySQL? Which Is Faster?

This article compares MySQL's COUNT(*), COUNT(1) and COUNT(column) functions, explains how each handles NULL values, analyzes performance differences on MyISAM and InnoDB engines, and provides practical recommendations for writing efficient count queries and existence checks.

COUNT(1)COUNT(column)InnoDB
0 likes · 9 min read
COUNT(*), COUNT(1) or COUNT(column) in MySQL? Which Is Faster?