Actually I have dealt with this and did some testing. What I ended up doing
was creating an array with the look up vaules like so
<CFSet ResultsArray= ArrayNew(1)>

         <cfloop query = "QMyResults">
        <CFSet ResultsArray[QuestionID]= QMyResults.SurveyResultsValue>
        <cfloop >

And then instead of doing a QoQ I just feed it the ID I was trying to tease
out like so

        #ResultsArray[MyID]#

The QoQ was expensive in terms of execution time. The execution time for the
report went from 30 seconds to around a second. I don't know if this is best
practices but it did the trick.


On Tue, Sep 16, 2008 at 5:54 PM, Jim McAtee <[EMAIL PROTECTED]>wrote:

> I have a process that needs to do about 500 record lookups by ID.  I
> thought I'd do a single query of the table, pulling down the needed data
> for every record on file (say 1000 records, just three columns) and then
> use QoQ instead of hitting the database so many times.
>
> Is there any way to index or otherwise optimize the dataset that I
> retrieve to optimize the query of query lookups?  If I'm doing lookups
> using a particular column, would it help to sort the query by that column?
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312682
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to