Thursday, January 16, 2003, 6:16:27 PM, you wrote:
ps> (Narrowly) I think the answer might actually be NO, because you specified 
ps> the values below :)

Unless I am misunderstanding what you are saying, the answer no, would
be incorrect.

Query caching does not make any distinction based upon whether or not
a variable is used. What matters is the sql string after CF evaluates
it.

<cfset siteID = 2>
<cfquery name="myquery" datasource="#request.dsn#" 
cachedwithin="#createTimeSpan(0,0,15,0)#">
SELECT * FROM tblSites
WHERE siteID=#siteID#
</cfquery>

<cfquery name="myquery" datasource="#request.dsn#" 
cachedwithin="#createTimeSpan(0,0,15,0)#">
SELECT * FROM tblSites
WHERE siteID=2
</cfquery>

When this code is run for the first time, the second query will be
cached.

ps> And recent postings here pointed out the speed benefits of CFQUERYPARAM
ps> (which cannot be used on cached queries).

A cached query will blow away any query speedwise that connects to the
database, cfqueryparam or not.

--
jon

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to