I'm a firm believer in modular, re-usable coding practices and that very
much includes my DB work. I work with *large* amounts of queried financial
data, both hosted locally and remotely and by implementing these idea's
we've dropped our DB query times by 60%... an average of 5 seconds knocked
off the clock!

Ok... it's just my opinion people. What works for me and how I do my job may
not be everyone's cup of tea. At the end of that very post I wrote:
'I could be wrong... and I'm definitely not an authority'. Do I think I'm
wrong about this? Nope... but it's how I work as I've proven it to myself.

Cheers,

Kevin

-----Original Message-----
From: Charlie Griefer [mailto:[EMAIL PROTECTED] 
Sent: August 30, 2005 11:20 AM
To: CF-Talk
Subject: Re: CF Test

On 8/30/05, Kevin Aebig <[EMAIL PROTECTED]> wrote:
> Using a count makes that query completely useless. It can't be reused, nor
> does it return anything of relevance. Which means its sole purpose is to
> bring back a single number...

What makes you think that in a given circumstance, that the single
number returns is of no relevance?  Obviously it may or may not
be...but to make a blanket generalization that using a COUNT()
aggregate function to return a number of records is always useless is
(IMHO) incorrect.

If I just need a count, why would i want to return a recordset? 

> -----Original Message-----
> From: Mark A Kruger [mailto:[EMAIL PROTECTED]
> Sent: August 30, 2005 10:38 AM
> To: CF-Talk
> Subject: RE: CF Test
> 
> Kevin,
> 
> This is not a pointless query
> 
> 
>       <CFQUERY NAME="test" DATASOURCE="test">
>        SELECT Count(*)  AS total
>        FROM TestTable
>       </CFQUERY>
> 
> You would NOT  want to select all the records in a table if all you wanted
> was the total. Otherwise you are bringing in the whole kit and caboodle
and
> then just discarding the rows in favor of the meta data. It's a hit on the
> DB, the web server memory and network traffic - particularly for large
> recordsets.
> 
> -Mark
> 
> 
> 
> 
> 
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:216814
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to