I understand where you're going with this and I can appreciate what you're trying to say, but it's not the case with me.
Not to an ass, but I wouldn't do that. You obviously aren't even making an attempt to see this from my perspective so let's just agree to disagree... Sincerely, Kevin -----Original Message----- From: Nick Han [mailto:[EMAIL PROTECTED] Sent: August 30, 2005 1:09 PM To: CF-Talk Subject: RE: CF Test Kevin, how about this scenario? <cfquery name="query1"> Select count(*) from users where lastname like 'smith%' </cfquery> <cfif query1.count gt 500> Notify users that they have to do a nightly scheduled report. <cfelse> /* run a full-on query */ <cfquery name="query2"> Select lastname, firstname, phone, address, blah blah from users where lastname like 'smith%' </cfquery> </cfif> -----Original Message----- From: Kevin Aebig [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 30, 2005 11:59 AM To: CF-Talk Subject: RE: CF Test One... I'm not laughing. Two... Exactly my point. I can't remember the last time I *only* needed a count. Cheers, Kevin -----Original Message----- From: Nick Han [mailto:[EMAIL PROTECTED] Sent: August 30, 2005 12:45 PM To: CF-Talk Subject: RE: CF Test > 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?! A dba will laugh his or her ass off if he/she heard this. Select count(*) from table versus select * from table makes a big difference when you have thousands of records, if all you need is a record count. -----Original Message----- From: Kevin Aebig [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 30, 2005 10:07 AM To: CF-Talk Subject: RE: CF Test 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... And no matter what you're calling, it's a hit on the DB, the web server memory and network traffic. To what extent depends on the query and coding style as well as the project in question. I'm not saying SELECT * is a better query, but I do believe it's smarter to roll multiple uses into a single result set. Cheers, Kevin -----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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:216858 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=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54