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> ______________________________________________________________________ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists