[V4WS 1.11] Any faster to use COUNT(RecID) instead of COUNT(other field)?

Ivan Smahin ivan_smahin at valentina-db.com
Thu Nov 16 12:42:21 CST 2006


Hello Steven,

Thursday, November 16, 2006, 12:28:57 PM, you wrote:

> Ruslan,

> is it any faster/more efficient to use

> SELECT  MAX(foo),COUNT(RecID) FROM x

> instead of

> SELECT  MAX(foo),COUNT(foo) FROM x

> ie, to specify RecID for the COUNT argument? For the
> COUNT argument you can use any field so i am wondering
> if using the RecID field is more efficient?

Let's distinct to different forms of count() function.

The  field  name is just a sign to count not null-value records only.
count(*) count all records (just a record count)

Moreover it is DISTINCT and ALL keywords exists in case of first form.

So it depends on what you want to count.


-- 
Best regards,
 Ivan                            mailto:ivan_smahin ÎÁ valentina-db.com



More information about the Valentina mailing list