I used to work with Oracle but I'm pretty rusty. Anyway It seems the order performancewise (slowest to fastest) is this, according to AskTom aka Tom Kyte.
AskTom 1) utl.file, ie writing to file directly from oracle proc. Assumes you have access to oracle db. This is the slowest, which surprised me a bit.
2) using sql plus. example here
Stackoverflow . My guess is that this is what sql developer or Toad does behind the scenes
3) Pure C code. But pure C is too hard for me.
I would try sql plus, even though it is nor superelegant. I might also try C# with a datareader. Not the versions where you fill a dataset, but one where you open a datareader, and declare a fetch size and loop over. I would think it should be reasonably memory friendly. For performance you have to test a bit. See example here.
Oracle docs . Datareader can be used with refcursors also
https://docs.oracle.com/...OracleRefCursorClass.htm
Edited by user
2020-07-01T08:02:18Z
|
Reason: Not specified