Oracle 视图 DBA_HIST_LIBRARYCACHE 官方解释,作用,如何使用详细说明

本站中文解释

DBA_HIST_LIBRARYCACHE是Oracle提供的一个视图,可以用来查看缓存中对象的访问次数和命中次数,以及对应的命中率等表现数据。DBA_HIST_LIBRARYCACHE视图有利于用户了解某个对象是如何被访问和命中的,是否需要改善该对象的缓存状态,是否合理分配资源,以便追求最优的性能。

使用DBA_HIST_LIBRARYCACHE的步骤如下:

1.查询视图:使用select * from dba_hist_librarycache;查询出视图中的内容;

2.从查询结果中查询对应对象在缓存中的命中率:使用select name, gethitratio, pinhitratio, reloads from dba_hist_librarycache where name=’对象名’;查询出每个对象的命中率;

3.通过命中率了解对象的访问状况:如果命中率过低,则可以考虑重新调整内存的分配方式来优化缓存的命中率;

4.对不必要的对象加以缓存:可以在缓存中检查是否存在不必要的对象,如果有,则可以将不必要的对象从缓存中移除;

5.优化系统性能:根据缓存中的数据,系统管理员可以找出影响性能的潜在因素,从而找出改善性能优化系统性能的有效方案。

官方英文解释

DBA_HIST_LIBRARYCACHE displays historical statistics about library cache performance and activity.

This view contains snapshots of V$LIBRARYCACHE.

Column Datatype NULL Description

SNAP_ID

NUMBER

NOT NULL

Unique snapshot ID

DBID

NUMBER

NOT NULL

Database ID for the snapshot

INSTANCE_NUMBER

NUMBER

NOT NULL

Instance number for the snapshot

NAMESPACE

VARCHAR2(15)

NOT NULL

Library cache namespace

GETS

NUMBER

Number of times a lock was requested for objects of the namespace

GETHITS

NUMBER

Number of times an object’s handle was found in memory

PINS

NUMBER

Number of times a PIN was requested for objects of the namespace

PINHITS

NUMBER

Number of times all of the metadata pieces of the library object were found in memory

RELOADS

NUMBER

Any PIN of an object that is not the first PIN performed since the object handle was created, and which requires loading the object from disk

INVALIDATIONS

NUMBER

Total number of times objects in the namespace were marked invalid because a dependent object was modified

DLM_LOCK_REQUESTS

NUMBER

Number of GET requests lock instance locks

DLM_PIN_REQUESTS

NUMBER

Number of PIN requests lock instance locks

DLM_PIN_RELEASES

NUMBER

Number of release requests PIN instance locks

DLM_INVALIDATION_REQUESTS

NUMBER

Number of GET requests for invalidation instance locks

DLM_INVALIDATIONS

NUMBER

Number of invalidation pings received from other instances

CON_DBID

NUMBER

The database ID of the PDB for the sampled session

CON_ID

NUMBER

The ID of the container that CON_DBID identifies. Possible values include:

  • 0: This value is used for rows containing data that pertain to the entire CDB. This value is also used for rows in non-CDBs.

  • 1: This value is used for rows containing data that pertain to only the root

  • n: Where n is the applicable container ID for the rows containing data

See Also:

“V$LIBRARYCACHE”


数据运维技术 » Oracle 视图 DBA_HIST_LIBRARYCACHE 官方解释,作用,如何使用详细说明