Are OracleLobs buffered or streamed?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
rdingwall
Posts: 3
Joined: Wed 25 Aug 2010 09:10
Location: London, UK

Are OracleLobs buffered or streamed?

Post by rdingwall » Wed 15 Sep 2010 12:02

Hi, I was wondering, if I load a 100MB file into an OracleLob for an INSERT, will that 100MB be buffered locally in memory first, or streamed directly from disk over the network to Oracle?

And is it the same behaviour for SELECTs via OracleDataReader.GetOracleLob()?

rdingwall
Posts: 3
Joined: Wed 25 Aug 2010 09:10
Location: London, UK

Post by rdingwall » Wed 15 Sep 2010 12:18

Actually, it seems like yes, it is buffered locally for writing but not for reading. With a simple test app and a 1GB BLOB:
  • INSERT using FileStream.CopyTo(OracleLob) and with a 1GB BLOB it spiked up to 1.6GB of memory for an INSERT
  • SELECT using reader.GetOracleLob().CopyTo(fileStream) memory stayed under 10MB

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Fri 17 Sep 2010 10:14

We will analyze the possibility of writing Oracle LOBs into the database without buffering them in memory. We will inform you about the results of our investigation.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Wed 12 Jan 2011 17:13

We have implemented the possibility of changing the OracleLob.Cached property, which specifies whether the whole LOB will be stored in the memory. This feature is available in in the new 6.0.86 version of dotConnect for Oracle. This build can be downloaded from
http://www.devart.com/dotconnect/oracle/download.html
(the trial version) or from Registered Users' Area (for users with active subscription only):
http://secure.devart.com/

For the detailed information about the fixes and improvements available in this build, please refer to
http://www.devart.com/forums/viewtopic.php?t=19968

Post Reply