Suc COUNT() only counts non-null values.
Suc More on topic...if you say COUNT(fieldname), you say that you want to
Suc count all of the non-null values in that column.
COUNT(1) or COUNT(2) or COUNT(any_constant) should count all records (this is
how it works for example in oracle)
--
Best
Stembridge, Michael [EMAIL PROTECTED] wrote on 03/14/2005 02:18:25
PM:
I noticed another listmember used COUNT(fieldname) instead of COUNT(*).
Is there a noticeable performance increase with COUNTing a column name
instead of all columns? (ie, like SELECTing specific columns instead
of
I noticed another listmember used COUNT(fieldname) instead of COUNT(*).
Is there a noticeable performance increase with COUNTing a column name
instead of all columns? (ie, like SELECTing specific columns instead of
using SELECT *)
Thanks!
--
MySQL General Mailing List
For list archives:
Stembridge, Michael wrote:
I noticed another listmember used COUNT(fieldname) instead of COUNT(*).
Is there a noticeable performance increase with COUNTing a column name
instead of all columns? (ie, like SELECTing specific columns instead of
using SELECT *)
If anything, I'd expect the