I have two choices when writing an SQL statement with the COUNT
function.
SELECT COUNT(*) FROM
SELE
Option 2 actually counts all the fields where some_column_name
is not null. Option 1 counts all the fields where any field is not null. So you might actually get different results out of these two queries. Most of the time you actually want to count all the rows, and then the fastest option, which does not check for any of the fields, is simply SELECT COUNT(1) FROM ...