You could do this by storing the query in a shared memory scope, such as
server, application, or session, and then you could use <CFOUTPUT> or
<CFLOOP> to iterate through the query and only process records that met
certain criteria.

My guess is that you would get terrible performance from this, particularly
if the query is very large, but it is possible.
If you'd like to see a specific example please let me know.

Generally the best practice is to get the database to do as much filtering
and sorting as you can.

Bob

-----Original Message-----
From: Willy Ray [mailto:[EMAIL PROTECTED]]
Sent: February 5, 2001 3:48 PM
To: CF-Talk
Subject: Sub-query a cached query?



Can I make an enormous cached query, and then query those results?  Say, for
example, I wanted to query all customers and all invoices at once, then
display a list of customers with unpayed invoices, linked with URL variables
to a detail page that would show the invoice details.  Could I do this with
one big query, cached at the beginning, and never hit my database again
until the cache expired?

Willy Ray
Web Designer
Westminster College
Salt Lake City, UT
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to