>From my experience, this is not CF that is really the issue, it is your
DB.  We have a huge table like yours that we create csv files on the fly
and dump them to the client via CFCONTENT/CFHEADER so Excel opens on the
client machine.  The SQL is what causes our timeout issues.  Some
suggestions:

1) use the URL var requesttimeout=x to direct CF to run the page longer
than the server wide setting of timeout.
2) streamline the SQL.  Depending on your RDBMS you may need to adjust
the order of your WHERE clauses.  Also, make use of indices or even put
the SQL into an SP.  
3) We haven't seen your code.  Assuming your SQL is running well, when
you create the csv file, you might be able to optimize that code too.

Doug

>-----Original Message-----
>From: Tony Weeg [mailto:tony@;navtrak.net]
>Sent: Thursday, November 14, 2002 10:52 AM
>To: CF-Talk
>Subject: cfmx/cfquery/writing csv files
>
>
>hi list.
>
>I have a question about writing csv files, record sets and which way
>would
>be the best to handle something like this....
>
>A user makes a request for approximately 200 lines from an 11 million
>record database. that
>request is then written to a csv file, and emailed to the client.
>
>I am currently just doing the query, writing the data and emailing the
>csv file to the client.
>
>problem: the request for the query to write the csv file is timing out.
>
>question 1: does cf do the query, close the connection, write the csv
>from a disconnected record set and then mail it? or is cf doing the
>query, line by line, then writing each line to the csv file one at a
>time?
>
>please help, also, do you have any suggestions on how to make this
>slicker...my ideas....
>
>1. generate the recordset in cf
>2. invoke a webService, send the recordset to the webservice 
>3. break this logic away from cf since what I am finding is that cf
>doesn't do this very fast?
>
>please let me know what you think and what else others are 
>doing in this
>situation.....
>
>thanks!
>
>..tony
>
>Tony Weeg
>Senior Web Developer
>Information System Design
>Navtrak, Inc.
>Fleet Management Solutions
>www.navtrak.net
>410.548.2337 
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Reply via email to