Beyond the obvious security benefits of preventing url tampering and sql
injection, you should see improved performance by using <cfqueryparam>
because the DB does not have to take on the responsibility of parsing,
validating and analyzing as much data... So it will be able to return your
recordsets faster.

Cfqueryparam also helps your DB with caching dynamic queries like the one
you're working with below.

Try turning on CF debugging output and try the queries both ways. As your
load increases, you should see the benefit of using cfqueryparam. 

Jim Rising
Sr. Cold Fusion Developer
ICGLink Inc.
www.icglink.com


-----Original Message-----
From: Dave Hatz [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 03, 2007 2:20 PM
To: CF-Talk
Subject: Binding Oracle query params

I am curious if someone could tell me the difference between these 2 queries
from a performance standpoint.  We are using CF7 with Oracle 9i. 

SELECT First, Last FROM Customers WHERE ID=<cfqueryparam
cfsqltype="cf_sql_varchar" value="#ID#">

vs. 
 
SELECT First, Last FROM Customers WHERE ID='1234'
 
Is there a performance difference between these 2 queries?
 
Thanks,
Dave Hatz



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:282842
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