Not a bad idea, although I'm not sure it will really make the whole thing much faster, unless may be for very large tables having a large number of columns. However the code itself could be made more efficient.
In <cfset ArrayAppend(toGet, ListGetAt(ValueList(ids.ID), a))> in a loop, you are evaluating ValueList(ids.ID) every time in the loop. Further more, creating the list could be more efficient looping in the query and using the startRow and MaxRows attributes: How about simply this: <cfset startRow = 51> <cfset marRows= 50> <cfquery name="ids"> SELECT ID FROM myTable WHERE a < 5 and b LIKE '%test%' </cfquery> <cfset toGet = ""> <cfoutput query="ids" startRow="#startRow#" maxRows="#MaxRows#"> <cfset listAppend(toGet, ID)> </cfoutput> <cfquery name="all"> SELECT * FROM myTable WHERE ID IN (#toGet#) </cfquery> -- _______________________________________ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:216946 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

