>Hi, > >I have an application which takes a variety of temperature and pressure >readings and runs them through a set of calculations, which are then saved >to the database. > >Scheduled tasks also do periodic calculations, averaging the results over a >calendar month, quarter or year. > >Both new periods (months) and new calculations have been added to these >routines, and as a result, I need to recalculate several years' worth of >data. > >Since even the existing periods (quarters and years) must be recalculated >to incorporate the new, additional calcs, I'm choosing to simply >recalculate everything and insert it into new tables, which will then >replace the old ones. > >However, when I run the routine that will recalc all this data, the inserts >run fine for some period of time, then stop. There's no error returned from >CF, and in fact, the page never returns at all. > >I've set a very long CF timeout so that the routine can continue. The >inserts simply stop happening. > >I see no memory or CPU problems on the server when this runs. > >Does anyone have any insight into what might be happening here? > > >-- >Thanks, > >Tom > >Tom McNeer >MediumCool >http://www.mediumcool.com >1735 Johnson Road NE >Atlanta, GA 30306 >404.589.0560
Generally it is quicker to store everything you need into an array of some sort, then when you go to do your insert loop over that array. For MySQL insert into temperature (thisTemp) VALUES <cfloop from="1" to="#arrayLen(tempArray)#" index="i">tempArray[#i#]<cfif i lt arrayLen(tempArray)>,</cfif> Oracle would be a little different. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355712 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

