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

本站中文解释

Oracle视图V$SESSION_CURSOR_CACHE是Oracle数据库中的系统视图。它显示了所有当前会话的缓存的操作游标的信息。

使用此V$SESSION_CURSOR_CACHE视图,您可以检查系统中打开的游标并识别缓存和游标状态。在一些固定的操作游标上使用此视图,可以帮助消除性能问题,特别是在大型工作负载下运行的系统中。

要使用V$SESSION_CURSOR_CACHE,可以使用以下SQL语句:

SELECT * FROM v$session_cursor_cache;

这将返回每个会话的SQL语句ID、缓存中的游标数量、缓存中持有的游标数量、可缓存游标的总数量等信息。

官方英文解释

V$SESSION_CURSOR_CACHE displays information on cursor usage for the current session.

Note:

The V$SESSION_CURSOR_CACHE view is not a measure of the effectiveness of the SESSION_CACHED_CURSORS initialization parameter.

Column Datatype Description

MAXIMUM

NUMBER

Maximum number of cursors to cache. Once you hit this number, some cursors will need to be closed in order to open more. The value in this column is derived from the initialization parameter SESSION_CACHED_CURSORS.

COUNT

NUMBER

Current number of cursors (whether they are in use or not)

OPENS

NUMBER

Cumulative total of cursor opens minus one. This is because the cursor that is currently open and being used for this query is not counted in the OPENS statistic.

HITS

NUMBER

Cumulative total of cursor open hits

HIT_RATIO

NUMBER

Ratio of the number of times an open cursor was found divided by the number of times a cursor was sought

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

See Also:

“SESSION_CACHED_CURSORS”


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