Hi All! 

I've inherited a reporting application that allows users to dump the
results of a query into a CSV file (via the CFFILE tag) and either save it
or open it. This works pretty well most of the time, but there are some
circumstances where the results set is over 150K rows. In those cases it
can take 30+ minutes to build the file and my users usually get impatient
and close their browsers before it is done building. Does anyone have any
ideas about how I can speed up the process of building this file? This is
the code used to build the file:

<cfset export_header="Record
ID,FirstName,LastName,Address1,Address2,City,State,Zip">

<!--- export table header --->
<cfoutput>
<cffile action="write" 
 file="#exportFilePath#"
 output="#export_header#"
 addnewline="yes">
</cfoutput>
         

<!--- append the search query to the file --->
<cfoutput query="online_reg">
        <cfset
outputLine="#ID#,#FirstName#,#LastName#,#Address1#,#Address2#,#City#,#State#,#Zip#">
                
        <cffile action="append"
                file="#exportFilePath#"
                output='#outputLine#'
                addnewline="yes">
</cfoutput>

I've tried building one big variable and appending that all at once
instead of appending each record one at a time and that takes about twice
the time to execute that this code does. I'm beginning to wonder if CFFILE
is the best way to go. Any other ideas?
I'm running ColdFusion 4.5.

Thanks for any help you can give!
_______________
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
                                

Reply via email to