As I replied to Dan Switzer's similar comment. Doesn't CF by default
pool multiple cfqueries to the same datasource within the same page to
the same ODBC connection ? I also understand that the first query run
will check for an open connection to that datasource. I guess this means
enhanced performance when pooling across distinct clients requests for
cfquery; but a server scoped pool within the cf_ado tag could also be
implemented.
I'll run some more tests and keep you informed.
Dave Watts wrote:
>
> > Calling ADO through CFOBJECT is 20% faster than CFQUERY !!!
> >
> > Test it yourself at http://dev.aylo.com/testing/Perf/db.cfm
>
> When I tested it myself, using one iteration, the speeds were consistently
> the same for either one; each would return 46-47 ms or 62-63 ms. I think
> there's an issue with your looping construct, which is inflating the values
> for CFQUERY.
>
> > <cfloop from="1" to="#times#" index=i>
> > <cfquery name="licenses" datasource="FusionLicenser">
> > select * from licenses
> > </cfquery>
> > </cfloop>
>
> In this loop, I don't think you're guaranteed that it will use the same
> connection each time; CF handles connection pooling, but the CF developer
> has little control over whether a specific connection will be reused.
>
> > <CFOBJECT TYPE="COM" NAME="conn" CLASS="ADODB.Connection"
> > ACTION="CREATE">
> > <cfset isopen = conn.Open("FusionLicenser","","",-1)>
> > <cfloop from="1" to="#times#" index=i>
> > <CFOBJECT TYPE="COM" NAME="rs" CLASS="ADODB.Recordset"
> > ACTION="CREATE">
> > <cfset tmp = rs.Open("select * from licenses",
> > conn,1,1,1)>
> > </cfloop>
>
> In this loop, you're creating a single connection before the loop, and
> within the loop you're forcing all the recordsets through that one
> collection.
>
> To me, this illustrates one of the problems of testing using loops. A better
> testing methodology is to run multiple clients, and return average times
> across those clients. Of course, it's certainly possible that ADO is faster
> than CFQUERY, but I can't be sure that this test demonstrates that. It may
> also be the case that, aggregated across an entire server or application,
> CFQUERY performes better since it handles connection pooling in the
> background.
>
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
> voice: (202) 797-5496
> fax: (202) 797-5444
--
Aymeric Grassart <-> Chief Technology Officer
http://www.aylo.com <-> Aylo Inc.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.