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

本站中文解释

Oracle视图V$RESULT_SUBCACHE_STATISTICS描述的是结果缓存子池的统计信息,用于监控SQL结果缓存的状态,包括每个结果缓存子池的缓存命中率,缓存空间的使用等信息。

使用方法:通过查询此视图可以获取子池的每秒命中率(HITS_PER_SECOND)、每秒丢弃数(DROPPINGS_PER_SECOND)、使用缓存空间(TOTAL_CACHE_BYTES)等信息,可以通过它来诊断SQL结果缓存的使用情况,进而指导SQL优化以提升性能。

例如:可以查询每个结果缓存子池的缓存空间使用情况
SELECT * FROM v$result_subcache_statistics;

官方英文解释

V$RESULT_SUBCACHE_STATISTICS displays various result cache settings and usage statistics on a per subcache basis.

Column Datatype Description

ID

NUMBER

Statistic number

NAME

VARCHAR2(128)

Name of the statistic

This view displays the same statistics as the V$RESULT_CACHE_STATISTICS view. See Table 9-6 in the documentation for V$RESULT_CACHE_STATISTICS.

VALUE

VARCHAR2(81)

Value of the statistic

SUBCACHE_ID

NUMBER

Subcache ID

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

Note:

This view is available starting with Oracle Database 21c.

See Also:

“V$RESULT_CACHE_STATISTICS”


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