Вы находитесь на странице: 1из 1

Tuning the Dictionary Cache:

============================

Another task to tune the Shared Pool is to tune the Dictionary Cache. This is the
memory structure, where the statements related to the Data Dictionary, the logical
structures stored in the database, are cached. The Data Dictionary is queried
often, for example, to retrieve information about the database objects involved in
a query, grants to the user, this data should be accessed very fast.

The V$ROWCACHE dynamic performance view enables us to query for updated statistics
on the Dictionary Cache. The data in this view is cumulative since instance start-
up. The PARAMETER column identifies the data dictionary item, the total number of
requests,
GETMISSES identifies the number of requests not satisfied by the cache,
MODIFICATIONS identifies the number of times the data (related to the item) was
updated, and FLUSHES identifies the number of times the item was flushed to the
disk.

Note: An instance and a database are two different items. The database is a
collection of physical files or disks, while an instance is a set of Oracle
background processes/threads and a shared memory area. An instance can mount and
open only a single database; a
database may be mounted and opened by one or more instances at a time (as in Oracle
Real Application Cluster).

In this recipe, we also calculate the Hit Ratio for each item. We can also
calculate a cumulative Hit Ratio for the Dictionary Cache, as done for the Library
Cache:
SELECT SUM(GETS—GETMISSES) / SUM(GETS) AS "Hit Ratio" FROM V$ROWCACHE;

We need to keep this value above 85 percent.

Note: Please note that the first time objects need to be loaded into the cache, so
there can never be a 100 percent value for the Hit Ratio.

To improve the Dictionary Cache, we can reduce DDL activities and, if we use
sequences, use the CACHE option to avoid a get for each NEXTVAL call to the
sequence.

The size of the Dictionary Cache cannot be changed; it's a part of the Shared Pool
and is automatically maintained by the database. The database uses an algorithm
that prefers to keep dictionary data than library cache data in the shared pool,
because the performance
benefits achieved by using the former approach are more significant. We can only
size the Shared Pool using the SHARED_POOL_SIZE initialization parameter.

Вам также может понравиться