Oracle试图--v$event_name

等待事件的一个合集

官方文档

V$EVENT_NAME displays information about wait events.

ColumnDatatypeDescription
EVENT#NUMBERNumber of the wait event
EVENT_IDNUMBERIdentifier of the wait event
NAMEVARCHAR2(64)Name of the wait event. Names that appear in this column remain stable across Oracle Database releases, and they can be relied on by customer scripts.
PARAMETER1VARCHAR2(64)Description of the first parameter for the wait event
PARAMETER2VARCHAR2(64)Description of the second parameter for the wait event
PARAMETER3VARCHAR2(64)Description of the third parameter for the wait event
WAIT_CLASS_IDNUMBERIdentifier of the class of the wait event
WAIT_CLASS#NUMBERNumber of the class of the wait event
WAIT_CLASSVARCHAR2(64)Name of the class of the wait event
See Also: "Classes of Wait Events" for a description of the different wait event classes
DISPLAY_NAMEVARCHAR2(64)A clearer and more descriptive name for the wait event that appears in the NAME column. Names that appear in theDISPLAY_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_IDNUMBERThe 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


字段解释

EVENT# :事件号
EVENT_ID:事件ID
NAME:事件名称
PARAMETER1,PARAMETER2,PARAMETER3:等待事件相关的3个参数
WAIT_CLASS_ID:等待事件的所属类ID
WAIT_CLASS#:等待事件的类号
WAIT_CLASS:等待事件类型
DISPLAY_NAME(12c):等待事件对应更清晰的描述
CON_ID(12c): 数据所属的容器的ID。 可能的值包括:0:该值用于包含与整个CDB相关的数据的行,此值也用于非CDB中的行。1:该值用于仅包含根的数据的行。n:其中                              n是包含数据的行的适用容器ID。

示例:

EVENT#EVENT_IDNAMEPARAMETER1PARAMETER2PARAMETER3WAIT_CLASS_IDWAIT_CLASS#WAIT_CLASSDISPLAY_NAMECON_ID
2123926164927direct path readfile numberfirst dbablock cnt17407597678User I/Odirect path read0



Classes of Wait Events

每一个等待事件所属的类别,分为以下几大类:

Administrative:DBA命令导致的等待(例如,索引重建)

Application:应用程序的等待(例如,由行级锁定或显式锁定命令引起的锁定等待)

Cluster:与RAC资源有关的锁(例如,全局缓存资源,如“gc cr block busy”)

Commit:仅包含一个等待事件 - 等待重做日志写入确认(即“log file sync”)

Concurrency:等待数据库内部资源(例如,latches

Configuration:由于数据库或实例资源配置不正确导致的等待(例如,不合适的logfile大小,shared pool size)

Idle:这个等待表示会话不活动,是空闲状态(例如,“SQL*Net message from client”)

Network:与网络消息相关的等待(例如,“SQL*Net more data to dblink”)

Other:通常不会在系统上发生等待(例如,“wait for EMON to spawn”)

Queue:包含表示在流水线环境中获取更多数据的延迟的事件。 在这些等待事件上花费的时间表明无效率或其他问题正在进行中。 它                会影响诸如Oracle Streams,并行查询或DBMS_PIPE PL / SQL包之类的功能。

Scheduler:资源管理器相关等待(例如,“resmgr: become active”)

System I/O:等待后台进程I / O(例如,DBWR等待'db file parallel write')

User I/O:等待User I/O(例如“db file sequential read”)

等待事件Parameters

block#
等待的块号对应的block number,使用如下sql定位

select segment_name, segment_type, owner, tablespace_name
from dba_extents
where file_id = file#
     and block#
     between block_id and block_id + blocks - 1;
blocks

从文件读取或写入的块数。 块大小取决于文件类型:数据库文件的块大小取决于DB_BLOCK_SIZE。日志文件和控制文件的块大小等于操作系统平台的物理块大小。

break?

如果此参数的值等于0,则会向客户端发送重置。 非零值表示break已发送到客户端。

class

表示块的类型。 例如,类1表示数据块,类4表示段头。使用如下sql的输出查询。

SELECT view_definition FROM V_$FIXED_VIEW_DEFINITION WHERE
view_name='GV$WAITSTAT';

dba

缩写,“dba”表示由文件号和块号组成的数据块地址。

driver id

当前正在使用的驱动程序的断开连接功能的地址。

file#

文件号

id1

enqueue或者global lock的第一个标识符(id1)从P2或者P2RAW取值。标识符含义取决于P1的名称。

id2

enqueue或者global lock的第二个标识符(id2)从P3或者P3RAW取值。标识符含义取决于P1的名称。

le

相对索引号为V$GC_ELEMENT。

mode

该模式通常存储在P1或P1RAW的低位字节中,表示enqueue或者global lock请求的模式。具体如下:

Mode Value

Description

1

Null mode

2

Sub-Share

3

Sub-Exclusive

4

Share

5

Share/Sub-Exclusive

6

Exclusive

使用以下SQL语句来检索锁的名称和锁定请求的模式:

select chr(bitand(p1,-16777216)/16777215)||
       chr(bitand(p1, 16711680)/65535) "Lock",
       bitand(p1, 65535) "Mode"
from v$session_wait
where event = 'DFS enqueue lock acquisition';

name and type

可以通过查看P1或P1RAW的两个高位字节来确定enqueue或者global lock的名称或“类型”。名字总是两个字符。使用以下SQL语句来检索锁名称:

select chr(bitand(p1,-16777216)/16777215)||
      chr(bitand(p1,16711680)/65535) "Lock"
from v$session_wait
where event = 'DFS enqueue lock acquisition';

namespace

对象名称空间的名称,显示在V$DB_OBJECT_CACHE试图.

requests

“请求”的I / O数量。这与块的数量不同,因为一个请求可能包含多个块。

session#

inactive session的sid。

waited

会话等待该会话终止的总时间。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值