Oracle Essentials Oracle Database 11g

Oracle Essentials Oracle Database 11g by Rick Greenwald Page A

Book: Oracle Essentials Oracle Database 11g by Rick Greenwald Read Free Book Online
Authors: Rick Greenwald
Ads: Link
database buffer cache, a shared pool, and a redo log buffer as shown in the figure, and also possibly a Java pool, a large pool, and a Streams pool. The following sections describe these areas of the SGA. For a more detailed discussion of performance and the SGA, see “How Oracle Uses the System Global Area” in
    Chapter 7.
    Database buffer cache
    The database buffer cache holds blocks of data retrieved from the database. This buffer between the users’ requests and the actual datafiles improves the performance of the Oracle database. If a piece of data can be found in the buffer cache (for example, as the result of a recent query), you can retrieve it from memory without the overhead of having to go to disk. Oracle manages the cache using a least recently used (LRU) algorithm. If a user requests data that has been recently used, the data is more likely to be in the database buffer cache; data in the cache can be delivered immediately without a disk-read operation being executed.
    When a user wants to read a block that is not in the cache, the block must be read and loaded into the cache. When a user makes changes to a block, those changes are made to the block in the cache. At some later time, those changes will be written to the datafile in which the block resides. This avoids making users wait while Oracle writes their changed blocks to disk.
    This notion of waiting to perform I/O until absolutely necessary is common throughout Oracle. Disks are the slowest component of a computer system, so the less I/O
    performed, the faster the system runs. By deferring noncritical I/O operations instead of performing them immediately, an Oracle database can deliver better performance.
    Since Oracle8, the database buffer cache can be configured with buffer pools of the following types:
    DEFAULT
    The standard Oracle database buffer cache. All objects use this cache unless otherwise indicated.
    KEEP
    For frequently used objects you wish to cache.
    RECYCLE
    For objects you’re less likely to access again.
    50
    |
    Chapter 2: Oracle Architecture

    Both the KEEP and RECYCLE buffer pools remove their objects from consideration by the LRU algorithm.
    Youcan mark a table or index for caching in a specific buffer pool. This helps to keep more desirable objects in the cache and avoids the “churn” of all objects fight-ing for space in one central cache. Of course, to use these features properly you must be aware of the access patterns for the various objects used by your application.
    Oracle Database 10 g simplifed management of buffer cache size by introducing a new dynamic parameter, DB_CACHE_SIZE. This parameter can be used to specify cache memory size and replaced the DB_BLOCK_BUFFERS parameter present in previous Oracle releases. DB_CACHE_SIZE is automatically sized if MEMORY_TARGET or SGA_TARGET is set. Other initialization parameters include DB_KEEP_CACHE_
    SIZE and DB_RECYCLE_CACHE_SIZE and these must be manually sized if used.
    Shared pool
    The shared pool caches various constructs that can be shared among users. For example, SQL queries and query fragments issued by users and results are cached so they can be reused if the same statement is submitted again. PL/SQL functions are also loaded into the shared pool for execution and the functions and results are cached, again using an LRU algorithm. As of Oracle Database 11 g , a PL/SQL function can be marked in such a way that its result will be cached to allow lookup rather than recalculation when it is called again using the same parameters. The shared pool is also used for caching information from the Oracle data dictionary, which is the metadata that describes the structure and content of the database itself.
    Youcan specify a SHARED_POOL_SIZE initialization parameter, or it will be automatically sized if MEMORY_TARGET or SGA_TARGET is specified. Note that prior to Oracle Database 10 g , “out of memory” errors were possible if the shared pool was undersized, but current Oracle

Similar Books

The Chamber

John Grisham

Cold Morning

Ed Ifkovic

Flutter

Amanda Hocking

Beautiful Salvation

Jennifer Blackstream

Orgonomicon

Boris D. Schleinkofer