Whether or not the RDBMS caches it CF will still have to go to the dB server and get it. If you use cachedwithin (or cachedafter) then it stays in CF's memory, and no trips to the dB are required, so i'd say cache it. And don't forget you could put it in a persistent scope (either "application" or "server" in this case) by using <cfquery name="application.myquery" etc...>, and only running the query when you start up the application. There are pluses and minuses for bother cachedwithin/after and persistent scope caching - it depends on the individual case...
Bert On Wed, 03 Nov 2004 10:01:21 -0400, Chris Peters <[EMAIL PROTECTED]> wrote: > I have a web site that uses CFMX 6.1 and MS SQL for data handling. > > This question is probably because I don't know as much about MS SQL as I should, so > bear with me. > > Is it efficient to use cachedwithin on a query that only returns a row or two in the > recordset? Keep in mind that this query is accessed quite a bit. A colleague says > that the OS/RDBMS probably caches the small recordset anyway, so I should only use > cachedwithin on queries that use complex joins, return large datasets, use unions, > etc. > > Thanks for your help! > > Chris > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=36 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183270 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

