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

本站中文解释

Oracle 是一种关系型数据库管理系统(RDBMS),其中的视图是用于从给定的数据库表中提取字段信息的查询结构。V$SERVICE_STATS视图被用来显示一个数据库服务的当前性能统计信息。这个视图是从每个数据库服务的V$SERVICE_MEMORY视图中累积的数据,它可以帮助DBA和系统管理者监控和优化数据库服务的性能。性能计数器包括每秒平均会话数,每秒发送和接收请求数,每秒呼叫数,每秒活跃服务数,每秒活跃服务请求数,每秒完成的工作数,每秒发送失败的数量,每秒接收失败的数量以及每秒改变序列号的请求数等。使用V$SERVICE_STATS视图可以显示关于每一个服务的性能参数。

要使用V$SERVICE_STATS视图,可以使用SELECT语句来检索数据库服务名称,关联的计数器和计数器值:

SELECT Service_Name, Stat_Name, Value
FROM V$SERVICE_STATS;

该查询将返回计数器名称、关联的数据库服务以及它们的相应值,从这些数据中可以对数据库服务所执行的工作量进行估算。这样,DBA 就能够高效地管理和优化数据库服务以获得最佳性能。

官方英文解释

V$SERVICE_STATS displays a minimal set of performance statistics. These call rate statistics are used for making run-time routing decisions, for tracking service levels, and for per-instance diagnostics per call rate. The elapsed timing for each call provides a relative value across instances for how well a node is processing SQL calls issued under a service name.

When aggregation is enabled for the Service Name, then this view provides the timing and work done for calls issued for the whole service.

Column Datatype Description

SERVICE_NAME_HASH

NUMBER

Service name hash from V$SERVICES

SERVICE_NAME

VARCHAR2(64)

Service name from V$SERVICES

STAT_ID

NUMBER

Statistic identifier

STAT_NAME

VARCHAR2(64)

Derived statistic name from V$STATNAME and V$SESS_TIME_MODEL

VALUE

NUMBER

For statistics that measure time (such as the DB CPU, background elapsed time, or parse time elapsed statistics), this column displays a cumulative value in microseconds.

For other statistics that do not measure time (such as the db block changes, execute count, or logons cumulative statistics), this column displays the appropriate numeric value for the statistic.

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$SERVICES”

  • “V$STATNAME”

  • “V$SESS_TIME_MODEL”

  • Oracle Database
    Performance Tuning Guide
    for more information about using database statistics to manage the performance of Oracle Database


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