This wouldn't work.

If you're just doing a declarative, then you're only making a reference to
the application query.  Which means that you're still accessing the
application query even if you're using the request scope.

> -----Original Message-----
> From: Joe Bastian [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 13, 2002 3:09 PM
> To: CF-Talk
> Subject: RE: RE: Storing Queries in Application Scope
>
>
> Hi Issac,
>       Your are right as well.."Right tool for the right Job". I
> wonder if it
> would be a
>       better solution to "NOT Duplicate the Structure" like
>       <cflock type="readonly" timeout="20">
>       <cfset Request.MyReqQuery=Application.MyQuery>  Note: No
> Duplicate or
> StructCopy
>       </cflock>
>       There by only making referrence to Application scope like a
> POINTER since
>       the data doesnt need to manipulated and only stored/displayed.
>       Wouldnt this save memory space.. since u are not really
> creating a DEEP
> Copy
>       into the 2nd structure(Request)?
> Joe
> Certified Advanced ColdFusion Developer
> [EMAIL PROTECTED]
>
> -----Original Message-----
> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 13, 2002 4:30 PM
> To: CF-Talk
> Subject: RE: RE: Storing Queries in Application Scope
>
>
> Hi Joe,
>
> Yes, your assertion is absolutely correct: using duplicate to copy data
> between the application and request scopes does mean having 2 ( or more )
> coppies of the same data taking up space in different places in memory (
> though my understanding is that the request scope variable memory is freed
> up when the page finished processing ).
>
> It typically can be done in the request scope if you only need it
> on a given
> page, if you don't have any problems going to the database on every page
> that needs the data, or if you can use cached queries.
>
> The advantage to storing this information in the application scope is that
> it's persistent across multiple users, so you may only have to go to the
> database once for several dozen or hundred or so page views (even in a
> cflock, retreiving a query from the application scope is almost invariably
> faster than retreiving the data from a database), and it provides more
> control over the data and when it's refreshed or otherwise modified than
> cached queries.
>
> All that being said, it's not always the solution of choice. :) Right tool
> for the right job, ya know. :)
>
> Isaac
>
> www.turnkey.to
> 954-776-0046
>
> Original Message -----------------------
> Using the duplicate() arent you actually creating a DEEP
> "DUPLICATE" of the
> structure.
> So you have the query in "APPLICATION" scope and then in
> "REQUEST" scope...
> taking
> up MEMORY?
> Why cant this just be done in the Request Scope and avoid LOCKING and
> Structure duplicates?
>
> <cfquery="Request.MyNewQuery" datasource="MyDB">
> Select Field1, Field2 .. from MyTable
> </cfquery>
>
>
> 
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to