how to write data into csv from db table?
Possible ways to write data into csv file 开发者_如何学运维from table or stored procedure?
You are possibly dealing with 2 bottlenecks - Network and DiskIO. If your database is large dumping the entirety of it to a flat file can take a while. Attempt to parallise the db query if your database is clustered: Grab ranges of data convert them to CSV in memory in parallel and once you have large enough block in memory commit to the file on disk.
精彩评论