Oracle® Objects for OLE Developer's Guide 10g Release 1 (10.1) Part Number B10118-01 |
|
To optimize an application for memory usage and network round-trips, there are several options available for reading and writing LOBs:
Single Piece Operation
The contents of a buffer are read or written to the database in one round-trip.
Multiple Piece Operation
A small buffer is used for multiple calls to the Read or Write methods. In this mode, the data is streamed rather than requiring a complete round trip for each Read/Write call. This is often the fastest method and definitely faster that doing several small Single Piece operations. It has the restriction that the data must be read and written sequentially, meaning that the offset increases automatically with each read or write. Also, you must know in advance the total amount that will be written and you cannot abort the operation in the before completion. For more information see the OraBLOB and OraCLOB interfaces and Read and Write LOB methods.
Lob Buffering Option
The LOB buffering option automatically buffers any read or write operations. A network round-trip occurs only when the FlushBuffer method is called. This is most useful when there are many small writes that occur all across the LOB. This method has significant restrictions. For more information about this method see the EnableBuffering method of LOB.