Page 1 of 1
Exporting large amount of data
Posted: Wed 15 Dec 2004 15:55
by Guest
Hi.
I am trying to export table of 1.5m records into csv file using ODAC.
My application consumes incredeble amount of memory and it is increasing with every row fetched
Any Suggestions?
Mike
Posted: Wed 15 Dec 2004 20:03
by brekhof
http://crlab.com/forums/viewtopic.php?t=125
I guess you could use the same solution I use (disconnect and reconnect every x000 records)
hth
Martin
Posted: Thu 16 Dec 2004 08:20
by Bagieta
But if you disconnect and reconnect you are loosing your cursor and must open your table once again. Also the data can be changed. Or I'm wrong?
Posted: Thu 16 Dec 2004 09:19
by Paul
Please use TOraQuery.UniDirectional=True. ODAC will use one memory buffer for all receiving records.
Posted: Thu 16 Dec 2004 11:25
by brekhof
Bagieta wrote:But if you disconnect and reconnect you are loosing your cursor and must open your table once again. Also the data can be changed. Or I'm wrong?
You are probably right, but the alternative is huge memory consumption (or the uni-directional solution, never tried it)
Posted: Thu 16 Dec 2004 14:22
by Bagieta
Can the unidirectional be set in a runtime. The question is if I can use before opening a query, or after it or during creation a new query object?
Posted: Fri 17 Dec 2004 07:39
by Paul
No. You can set UniDirectional if TOraQuery is closed.