On 3/16/07, Peter Boughton <[EMAIL PROTECTED]> wrote: > > > Whilst this does prevent you from caching queries using the built-in > attributes, it doesn't prevent you from caching them manually. > > eg: Something along the lines of this: > <cfif NOT (StructKeyExists(Session,'Bob') AND DateDiff('h', > Session.BobCreated, Now()) LT 1)> > <cfquery name="Session.Bob"> > ... > </cfquery> > <cfset Session.BobCreated = Now()/> > </cfif>
I've actually found that caching queries like that for VERY commonly used queries can actually be a performance drain... For example, I used to load our "code table" into the application scope. I used this code table all over the web site.. anytime I needed to turn "MI" to "Michigan" or "010" to "Athletics"... I'd run a simple udf... getAdvanceCode(tablid, tablkey) and it would output the appropriate value. But the code table itself is VERY large... 78,000 records I found that querying the database directly actually took less time than doing a query of queries... particularly when doing large numbers of such queries. Databases handle queries of large record sets far better than coldfusion does. Rick -- > Join the Open Source Coldfusion NCAA Pool for a chance to win a 2 gig USB > flash drive! > http://www.opensourcecf.com/forums/ncaapool.cfm ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272789 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4