Oracle9i Application Developer's Guide - Large Objects (LOBs) Release 1 (9.0.1) Part Number A88879-01 |
|
LOBS: Best Practices, 3 of 6
Use the following guidelines to achieve maximum performance with LOBs:
LOB
s are big, you can obtain the best performance by reading and writing large chunks of a LOB
value at a time. This helps in several respects:
LOB
from the client side and the client is at a different node than the server, large reads/writes reduce network overhead.
NOCACHE
' option, each small read/write incurs an I/O. Reading/writing large quantities of data reduces the I/O.
LOB
creates a new version of the LOB
CHUNK
. Therefore, writing small amounts at a time will incur the cost of a new version for each small write. If logging is on, the CHUNK
is also stored in the redo log.
LOB
data on the client, use LOB
buffering -- see OCILobEnableBuffering
(), OCILobDisableBuffering
(), OCILobFlushBuffer
(), OCILobWrite
(), OCILobRead
(). Basically, turn on LOB
buffering before reading/writing small pieces of LOB
data.
Chapter 5, "Large Objects: Advanced Topics", "LOB Buffering Subsystem" for more information on
See Also:
LOB
buffering.
LOB
. Ensure the length of the entire write is set in the 'amount
' parameter on input. Whenever possible, read and write in multiples of the LOB
chunk size.
LOB
s are optimized for the following operations:
Chapter 7, "Modeling and Design", "Performance Attributes When Using SQL Semantics with LOBs" , for information about performance issues when using SQL semantics with LOBs
See Also:
Table 9-1 lists the results of a performance test that enqueued 500 messages using a chunk size of 8KB for the LOB part of the payload. This performance test used Oracle8i Release 3 (8.1.7), and a DB_BLOCKSIZE = 8192 (8K), identical to the operating system block size.
Previous response times using a 16k chunksize, NOCACHE, and NOLOGGING for a message of 4000 bytes was 12:28 sec.
These results indicate that the CACHE parameter is the parameter giving the best performance improvement.
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|