one returns a single integer with the count.

the other returns every single fieldname in the table

I would think the first would always be quicker.

On the other hand, if you need the list of fields anyway, option 2
comes free with the query.



On 9/6/06, Michael E. Carluen <[EMAIL PROTECTED]> wrote:
> Pls confirm which of the two ways is more efficient or more recommended-
> please advise if it even makes a difference.  Thanks!
>
> SELECT count(fieldname) as thecount
>
> OR
>
> SELECT  fieldname
> ..
> ..
>  <cfset countfromquery = queryname.recordcount>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252303
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to