A Question of Speed
I have been doing some code review lately and am seeing quite a few cases that look something like this:
<cfloop from="1" to="#arrayLen(aData)#" index="i">
<cfquery ....>
<!--- insert query --->
</cfquery>
</cfloop>
<cftransaction>
You have a structure with some information in it and you are looping over the structure and adding the data from the structure into the database. No bid deal right?
Well you probably won't be surprised to find out that having a loop around the cfquery tag forces the Coldfusion server to execute that query N number of times, where N is the size of your array.
So what can you do?

