| |
 |
|
Oracle Features for the Data Warehouse
Oracle Tips by Burleson Consulting |
The Data Warehouse Development Life Cycle
Oracle Features for the Data Warehouse
Oracle’s Table CACHE Option
The table CACHE option was introduced with Oracle 7.2 to change
the behavior of full-table scan reads. When a table is created with
the CACHE option, full-table scan fetches against this table will be
treated as if they were not full-table scans, and they will be
placed at the most-recently-used end of the data buffer. Once the
data blocks have been read to the buffer cache, they will “age-out”
and move toward the least-recently-used side of the buffer just like
any other data block in Oracle.
In this sense the term “cache” is somewhat misleading. For example,
when Oracle packages are cached in the library cache, they are
“pinned” (i.e. ineligible from being aged-out ) and the packages
remain in the library cache for the life of the Oracle instance.
Data blocks, on the other hand, are not “pinned” into the data
buffer with the CACHE option and the data blocks will age-out of the
buffer at the same rate as other data blocks. Of course, the data
blocks will remain in the buffer for a much longer period than data
block fetched with full-table scans, but they will not stay in the
buffer indefinitely. At this time, the only way to “pin” a data
block in an Oracle buffer is to utilize Oracle parallel server to
dedicate an Oracle instance for a particular table, and make the
buffer large enough to hold the entire contents of the table.
The CACHE_SIZE_THRESHOLD init.ora parameter must be set to use the
table CACHE option. This parameter controls the space in the buffer
cache that is used exclusively for full-table scans. The Oracle
documentation falsely insinuates that the CACHE_SIZE_THRESHOLD
parameter is used exclusively with Oracle parallel server. In
reality this parameter applies to all Oracle databases.
Also, note that the CACHE_SIZE_THRESHOLD parameter must be smaller
than the table size. The default for this value is (.10 *
db_block_buffers), such that any table that is larger than 10% of
the buffer pool will not be effected by the CACHE option.
This is an excerpt from "High Performance
Data Warehousing", copyright 1997.
 |
If you
like Oracle tuning, you may enjoy the book
Oracle Tuning: The Definitive Reference , with
over 900 pages of BC's favorite tuning tips &
scripts.
You can buy it
directly from the publisher and save 30%, and get
instant access to the code depot of Oracle tuning
scripts. |
|