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

本站中文解释

Oracle的V$STATNAME视图对应的是STATNAME表,它描述了在V$SESSTAT和V$SYSSTAT视图中返回的所有计数器名称。它包含四个列,分别是STATISTIC#、NAME、CLASS、TYPE,用于描述计数器ID、计数器名称、计数器类别和计数器类型。

要使用该视图,可以使用以下两种方式:

1. 使用SELECT * FROM V$STATNAME命令,来查询STATNAME表中所有的数据。

2. 使用SELECT NAME FROM V$STATNAME WHERE CLASS = ‘COMMAND’命令,来查询类别为COMMAND的计数器的名称。

V$STATNAME视图可以用于查询V$SESSTAT和V$SYSSTAT表中的计数器名称。它可以帮助管理员更快地执行诊断测试,并且可以帮助监控过程中的应用程序表现。

官方英文解释

V$STATNAME displays decoded statistic names for the statistics shown in the V$SESSTAT and V$SYSSTAT tables.

On some platforms, the NAME and CLASS columns contain additional operating system-specific statistics.

Column Datatype Description

STATISTIC#

NUMBER

Statistic number

Note: Statistics numbers are not guaranteed to remain constant from one release to another. Therefore, you should rely on the statistics name rather than its number in your applications.

NAME

VARCHAR2(64)

Statistic name. Names that appear in this column remain stable across Oracle Database releases, and they can be relied on by customer scripts.

CLASS

NUMBER

A number representing one or more statistics classes. The following class numbers are additive:

  • 1 – User

  • 2 – Redo

  • 4 – Enqueue

  • 8 – Cache

  • 16 – OS

  • 32 – Real Application Clusters

  • 64 – SQL

  • 128 – Debug

  • 256 – Instance level

STAT_ID

NUMBER

Identifier of the statistic

DISPLAY_NAME

VARCHAR2(64)

A clearer and more descriptive name for the statistic that appears in the NAME column. Names that appear in the DISPLAY_NAME column can change across Oracle Database releases, therefore customer scripts should not rely on names that appear in the DISPLAY_NAME column across releases.

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:

  • “V$SESSTAT” and “V$SYSSTAT”

  • “Statistics Descriptions” for statistic descriptions

  • Your operating system-specific Oracle documentation


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