Hey guys,

This isn't so much a question as a discussion.  We are using cfmx 7
with an iseries (v.5r2) as/400 box, through a client access odbc
driver.  Now, this isn't your run of the mill iseries, its a very
beefy box with quad processors and a ton of memory (5gigs I think). 
We have used cfqueryparam everywhere throughout our applications with
no problems, its always very fast.

But today we were working on just going through some of the sql
statements, especially ones that are going to be run more frequently
and seeing if we can clean them up any.  There is a tool that comes
with client access that is a query analyzer that gives us times and
other information about each query.  so we were copying the queries
into the analyzer and replacing the queryparams with hardcoded values
and just tweaking on things.  We started to find some queries that
were running considerably faster in the analyzer than they were
actually running the cfquery in coldfusion.  Now granted, were talking
about tens of milliseconds here, but it was a noticable difference in
averages of those times.

What we found was that some of our simpler statements, for instance
where we were pulling from a single file, we're sometimes 20
milliseconds faster on average without the queryparam than with it. 
Now if we ran the same thing comparing some more complex statements
the difference switched, the cfqueryparam was considerably faster than
without.  But for simple statements, it seems like not using
cfqueryparam is much faster.

This isn't a big deal, but just wondered if anyone had any ideas why
we are seeing those differences.  I have always heard and understood
that anytime you can use cfqueryparam that you should.  And I do
realize that the queryparam also does type checking on the variables
being passed through it and protects against sql injection and all
that, but thats not really worry for this application.

Any thoughts anyone?
--
Ryan Guill
BlueEyesDevelopment
[EMAIL PROTECTED]
www.ryanguill.com
(270) 217.2399
got google talk?  Chat me at [EMAIL PROTECTED]

The Coldfusion Open Application Library - COAL - http://coal.ryanguill.com

www.ryanguill.com/
The Roman Empire: www.ryanguill.com/blog/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:224081
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