Matt Williams wrote: > Reviewing some older code, I found this. > > <cfif qKeyword.recordCount lte 150> > <cfset searchCriteria.tmpIDList = valueList(qKeyword.key) /> > </cfif>
> Does anyone know why the developer would have wanted this list only if > the record count is LTE 150? For the specific number of records you would have to ask the developer, but in general there is a point where just omitting the predicate altogether will make your query faster. > Are there any performance issues with using ValueList() on say 500+ records? From a database perspective the performance of a long IN list is pretty much linear in the number of elements in the list. Obviously you win a little on the overhead of establishing a connection and network latency, but not too much. If 1 element runs in .1 second, 500 elements in 5 seconds it is a safe bet that 1000 elements is going to take 10 seconds. Jochem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294881 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

