As far as I know, yes
-----Original Message-----
From: Tony Weeg [mailto:[EMAIL PROTECTED] 
Sent: donderdag 4 september 2003 16:33
To: CF-Talk
Subject: RE: <cfquery syntax


but what impact does it have on sql server 2000 ent edition.

we don't use oracle...does this same logic apply?

tony weeg
sr. web applications architect
navtrak, inc.
[EMAIL PROTECTED]
www.navtrak.net
office 410.548.2337
fax 410.860.2337


-----Original Message-----
From: Deanna Schneider [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 04, 2003 10:30 AM
To: CF-Talk
Subject: Re: <cfquery syntax


Tony,
It's faster for the database, not necessarily for CF. In Oracle, there's
this chunk of memory used for sql snippets. When a new query comes in,
it looks there first, to see if it already exists. If it does, it yanks
the data from there, instead of re-running/re-optimzing the query. (I
would imagine there's something similar in other databases.)

Anyway, using queryparam makes it so that two queries searching for
different values in the where clause look like the same query to Oracle.
In other words: select * from mytable where id = 1 is not the same as
select * from mytable where id =2 But, if you use queryparams... select
* from mytable where id = <cfqueryparam cfsqltype="cf_sql_integer"
value="1"> is the same to the query pool as select * from mytable where
id = <cfqueryparam cfsqltype="cf_sql_integer" value="2">

The query param gets translated to a "bind variable," and Oracle knows
that it's the same query except for this one variable. That's what makes
it faster. -d
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

Reply via email to