Thanks Dave W., Mike!  

> -----Original Message-----
> From: Mike Chabot [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 06, 2006 3:35 PM
> To: CF-Talk
> Subject: Re: COUNT() versus .recordcount
> 
> Count(primaryKey) is definitely better. Less information returned from
> the database so less bandwidth is used, plus the result can be
> obtained instantly from the index (I suppose this depends on the db).
> 
> -Mike Chabot
> 
> 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:252304
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