|Oracle9i Application Developer's Guide - Large Objects (LOBs)
Release 1 (9.0.1)
Part Number A88879-01
Migrating From LONGs to LOBs, 13 of 14
A piecewise INSERT or fetch of LOBs using the LONG-to-LOB API has comparable performance to the piecewise INSERT or fetch of LOBs using existing functions like
Since Oracle allows >4k data to be inserted into LOBs in a single OCI call, a round-trip to the server is saved.
Also, you can now read LOB data in one
OCIStmtFetch() call, instead of fetching the LOB locator first and then doing OCILobRead(). This improves performance when you want to read LOB data starting at the beginning (since
OCIStmtFetch() returns the data from offset 1). Hence the LONG-to-LOB API improves performance of LOB INSERTs and fetches.
The performance of assigning a VARCHAR2 buffer to a LOB variable is worse than the performance of the corresponding assignment of VARCHAR2 to the LONG variable because the former involves creating temporary LOBs. Hence PL/SQL users will see a silent deterioration in the performance of their applications.