Reviewing some older code, I found this.

<cfif qKeyword.recordCount lte 150>
        <cfset searchCriteria.tmpIDList = valueList(qKeyword.key) />
</cfif>

qKeyword is the results from a Verity search. The code is taking the
key column from that (which translates to the Primary Key) and
converting it to a list so that we can run another query to get actual
data columns. The query will use WHERE myID IN
(#searchCriteria.tmpIDList#).

Does anyone know why the developer would have wanted this list only if
the record count is LTE 150? The Verity results often return more than
150 records causing the cfset to not run, thus the query to get the
actual data columns returns all records (the WHERE myID IN () clause
doesn't run at all if tmpIDList isn't there). Doh!

Are there any performance issues with using ValueList() on say 500+ records?

What about performance of the query for doing WHERE myID IN (#List Of
500+ IDs#)?

Other workarounds for this issue?

-- 
Matt Williams
"It's the question that drives us."

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:294704
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