Don't use multiple calls to CFFILE, as they carry the overhead of file system access. Instead concatenate a string variable, and then write it all to the file in one call to CFFILE:
<cfloop query="get____"> <cfset s = s & "...." /> </cfloop> <cffile action="write" file="..." output="#s#" /> That should speed up things, and although I don't know how much, I'd imagine it would be significant. Also, running a scheduled task as James suggested is probably a good idea, since 30 minutes is a hell of a long time to wait for a HTTP request. Also, if you're using SQL server, it could well have a means to dump a CVS file out directly, rather than having to use CF to do it, although you'll have to confirm that with a SQL Server guru. You might also look to see if you could write a STORED PROC to do it for you. > -----Original Message----- > From: Wendy Copley [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 11, 2003 3:25 PM > To: CF-Talk > Subject: Re: Writing Query Results to a CSV using CFFILE > > > [EMAIL PROTECTED] writes: > >Which database are you using? > > We're on SQL Server 7.0. > > I should add that the query itself doesn't seem to be the problem -- it > returns in a matter of seconds. The lag is almost certainly happening in > the process of looping through the query results and appending each line > to the file. > > Thanks. > _______________ > Wendy Copley > Web Engineer > [EMAIL PROTECTED] > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

