Thanks Dominic, Good points. On to testing!
Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ Dominic Watson wrote: >> If your approach really outperforms the basic recommended IN () >> filtering, that's the way forward i guess! >> > > > I'd say do some tests with and without it with different numbers of > preliminary results from the verity search. There's very little difference > in the code; just an extra clause in the db query that filters out items not > in the verity results. You could even only include the clause if there is a > number of verity results below some threshold. I.e. > > <cfquery name="qDBFilterResults" datasource="#theDatasource#"> > * SELECT* * *FROM* tableX *WHERE* filters = #theFilters# <!--- yes, > cfqueryparam - could be many filters here ---> > <cfif qVerityresults.recordcount LTE someThresholdYouDefine> > AND tableXId IN (<cfqueryparam cfsqltype="cf_sql_integer" > value="#ValueList(qVerityResults.key)#" list="true">) > </cfif> > </cfquery> > > Of course, you'd only want to do this if you found that it performed better > with the IN () for a low number of preliminary results and performed worse > with the IN () for a higher number of preliminary results. Just fine tuning > really. > > > Dominic > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302685 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

