> What is the most graceful way to terminate a CFQuery once you 
> have used the results, and free up resources?
> 
> I use a query within a loop. Would it be more efficient to 
> terminate the query at the end of each cycle (assuming there 
> is a graceful way) and let CF reestablish the query or leave 
> the query open?
> 
> Background: I am guessing that you can tie up a lot of 
> resources by not pro actively terminating queries?

When you query the database, you get back a recordset. CF doesn't keep using
the database connection after that, so there's nothing to terminate really.
The database connection is returned to the connection pool for use by
another query. So, at that point, all you really have is the recordset,
which you should keep around until you're done with it. By default, it will
be discarded once the page has been processed.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized 
instruction at our training centers in Washington DC, Atlanta, 
Chicago, Baltimore, Northern Virginia, or on-site at your location. 
Visit http://training.figleaf.com/ for more information!


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191388
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

Reply via email to