At 03:01 PM 10/1/00 -0400, you wrote:
>On 10/1/00, paul smith penned:
> >I'm having problems resolving the efficiency, too.
> >
> >For example, is 2) below true for a cached query named Request.MyQyery?
> >That is, will there be multiple cached queries?  (One copy for each user
> >session?)
>
>Cached queries are a whole different animal. The query may be cached
>20 times, if it's passed different values in the WHERE statement 20
>times.

Yes.  My question was not stated in terms of a dynamic query, but that is, 
of course, what my interest is.

>But no, I believe the query is cached across the application, so if
>one user searches for something and the query is cached, and in 5
>minutes another user searches for the same thing, he will get the
>performance of the cached query.
>
>I think. :)

I hope this is so.  If it is, then naming the query Request.MyQuery 
eliminates the need for a LOT of locking downstream compared to naming the 
cached query Application.MyQuery.

BTW, contrary to Alliare's Best Practices, I find for CF 4.01 the option of 
naming a query Application.MyQuery instead of Request.MyQuery means you 
need to use CFLOCK like so:

<CFLOCK NAME="Application.AppName" etc

<CFQUERY NAME="Application.MyQuery" etc

blah, blah

</CFQUERY>

</CFLOCK>

since the Duplicate function is not available in CF4.01.

And in this same example in Best Practices, shouldn't Allaire have had
<CFSET application.qUser = Duplicate(variables.qUser)> rather than
<CFSET application.qUser = variables.qUser>?

best,  paul

==============================
Paul Smith, Web/Database Droid
A: SupportNet, Inc, 3871 Piedmont Ave, Oakland, CA 94611
    (There, there, there; there's, there, there....)
P: (510) 763-2358
C: (510) 205-6755
F: (510) 763-2370
E: [EMAIL PROTECTED]
W: http://www.support.net

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
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.

Reply via email to