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

本站中文解释

Oracle视图V$DB_CACHE_ADVICE是Oracle的动态性能视图,用于报告DB_CACHE_SIZE 参数的当前值和理想值(通过分析已分配的块)。此视图可以在不影响应用程序或数据库 的情况下确定是否应该对换出缓冲区增大,缩小,或者不变。如果DB_CACHE_SIZE参数太小,表示系统常常将活跃缓冲区换出到磁盘,然后在访问时重新从磁盘中分配;如果DB_CACHE_SIZE参数太大,可能会占用内存过多,从而浪费SGA空间。V$DB_CACHE_ADVICE视图提供了决定本地SGA的合理大小的建议。

要使用V$DB_CACHE_ADVICE视图,首先要向数据库提出相应的查询,该试图不允许修改,只能进行查看。查询可以根据所需的范围以及返回的参数值的大小选择不同的参数,通常我们采用如下查询:

SELECT * FROM V$DB_CACHE_ADVICE WHERE NAME = ‘DEFAULT’;

查询结果中包括估计参数值的儿子命名空间,大小,和功能,以及一些有助于判断建议值合理性的数据,包括已命中的参数值,活跃块,命中率,建议值,理论命中率等。如果统计信息指示命中率不够高,用户可以根据V$DB_CACHE_ADVICE视图给出的建议值来调整DB_CACHE_SIZE参数,从而改善性能。

官方英文解释

V$DB_CACHE_ADVICE contains rows that predict the number of physical reads for the cache size corresponding to each row.

The rows also compute a “physical read factor,” which is the ratio of the number of estimated reads to the number of reads actually performed by the real buffer cache during the measurement interval.

See Also:

“DB_CACHE_ADVICE”

Column Datatype Description

ID

NUMBER

Buffer pool identifier (ranges from 1 to 8)

NAME

VARCHAR2(20)

Buffer pool name

BLOCK_SIZE

NUMBER

Block size in bytes for buffers in this pool. Possible values: the standard block size, the power of 2 nonstandard block sizes, 2048, 4096, 8192, 16384, 32768.

ADVICE_STATUS

VARCHAR2(3)

Status of the advisory. ON indicates it is currently running; OFF indicates it is disabled (in this case the estimates are historical and calculated when last enabled).

SIZE_FOR_ESTIMATE

NUMBER

Cache size for prediction (in megabytes)

SIZE_FACTOR

NUMBER

Size factor with respect to the current cache size

BUFFERS_FOR_ESTIMATE

NUMBER

Cache size for prediction (in terms of buffers)

ESTD_PHYSICAL_READ_FACTOR

NUMBER

Physical read factor for this cache size, which is the ratio of the number of estimated physical reads to the number of reads in the real cache. If there are no physical reads in the real cache, the value of this column is null.

ESTD_PHYSICAL_READS

NUMBER

Estimated number of physical reads for this cache size

ESTD_PHYSICAL_READ_TIME

NUMBER

Estimated disk read time (in seconds)

ESTD_PCT_OF_DB_TIME_FOR_READS

NUMBER

Estimated disk time as a percentage of the total time

ESTD_CLUSTER_READS

NUMBER

Estimated total number of blocks foreground processes read from the global cache (Oracle Real Application Clusters only)

ESTD_CLUSTER_READ_TIME

NUMBER

Estimated total amount of time, in seconds, foreground processes read from global cache (Oracle Real Application Clusters only)

CON_ID

NUMBER

The ID of the container to which the data pertains. 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


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