学习动态性能表(六)
[font=宋体]这是一个寻找性能瓶颈的关键视图。它提供了任何情况下[/font][font=Times New Roman]session[/font][font=宋体]在数据库中当前正在等待什么[/font][font=Times New Roman]([/font][font=宋体]如果[/font][font=Times New Roman]session[/font][font=宋体]当前什么也没在做,则显示它最后的等待事件[/font][font=Times New Roman])[/font][font=宋体]。当系统存在性能问题时,本视图可以做为一个起点指明探寻问题的方向。[/font][font=Times New Roman] [/font]
[font=宋体] [/font][font=Times New Roman]V$SESSION_WAIT[/font][font=宋体]中,每一个连接到实例的[/font][font=Times New Roman]session[/font][font=宋体]都对应一条记录。[/font]
[font=Times New Roman] [/font]
[b][font=Times New Roman]V$SESSION_WAIT[/font][/b][b][font=宋体]中的常用列[/font][/b]
[b][font=Times New Roman] [/font][/b]
[font=Wingdings]l
[/font][font=Times New Roman]SID: session[/font][font=宋体]标识[/font]
[font=Wingdings]l
[/font][font=Times New Roman]EVENT: session[/font][font=宋体]当前等待的事件,或者最后一次等待事件。[/font]
[font=Wingdings]l
[/font][font=Times New Roman]WAIT_TIME: session[/font][font=宋体]等待事件的时间[/font][font=Times New Roman]([/font][font=宋体]单位,百分之一秒[/font][font=Times New Roman])[/font][font=宋体]如果本列为[/font][font=Times New Roman]0[/font][font=宋体],说明[/font][font=Times New Roman]session[/font][font=宋体]当前[/font][font=Times New Roman]session[/font][font=宋体]还未有任何等待。[/font]
[font=Wingdings]l
[/font][font=Times New Roman]SEQ#: session[/font][font=宋体]等待事件将触发其值自增长[/font]
[font=Wingdings]l
[/font][font=Times New Roman]P1, P2, P3: [/font][font=宋体]等待事件中等待的详细资料[/font]
[font=Wingdings]l
[/font][font=Times New Roman]P1TEXT, P2TEXT, P3TEXT: [/font][font=宋体]解释说明[/font][font=Times New Roman]p1,p2,p3[/font][font=宋体]事件[/font]
[font=Times New Roman] [/font]
[b][font=宋体]附注:[/font][/b]
[font=Times New Roman]1.State[/font][font=宋体]字段有四种含义﹕[/font]
[font=Times New Roman](1)Waiting[/font][font=宋体]:[/font][font=Times New Roman]SESSION[/font][font=宋体]正等待这个事件。[/font]
[font=Times New Roman](2)Waited unknown time[/font][font=宋体]:由于设置了[/font][font=Times New Roman]timed_statistics[/font][font=宋体]值为[/font][font=Times New Roman]false[/font][font=宋体],导致不能得到时间信息。表示发生了等待,但时间很短。[/font]
[font=Times New Roman](3)Wait short time[/font][font=宋体]:表示发生了等待,但由于时间非常短不超过一个时间单位,所以没有记录。[/font]
[font=Times New Roman](4)Waited knnow time[/font][font=宋体]:如果[/font][font=Times New Roman]session[/font][font=宋体]等待然后得到了所需资源,那么将从[/font][font=Times New Roman]waiting[/font][font=宋体]进入本状态。[/font]
[font=Times New Roman] [/font]
[font=Times New Roman]2.Wait_time[/font][font=宋体]值也有四种含义:[/font]
[font=Times New Roman](1)[/font][font=宋体]值[/font][font=Times New Roman]>0[/font][font=宋体]:最后一次等待时间[/font][font=Times New Roman]([/font][font=宋体]单位:[/font][font=Times New Roman]10ms)[/font][font=宋体],当前未在等待状态。[/font]
[font=Times New Roman](2)[/font][font=宋体]值[/font][font=Times New Roman]=0[/font][font=宋体]:[/font][font=Times New Roman]session[/font][font=宋体]正在等待当前的事件。[/font]
[font=Times New Roman](3)[/font][font=宋体]值[/font][font=Times New Roman]=-1[/font][font=宋体]:最后一次等待时间小于[/font][font=Times New Roman]1[/font][font=宋体]个统计单位,当前未在等待状态。[/font]
[font=Times New Roman](4)[/font][font=宋体]值[/font][font=Times New Roman]=-2[/font][font=宋体]:时间统计状态未置为可用,当前未在等待状态。[/font]
[font=Times New Roman] [/font]
[font=Times New Roman]3.Wait_time[/font][font=宋体]和[/font][font=Times New Roman]Second_in_wait[/font][font=宋体]字段值与[/font][font=Times New Roman]state[/font][font=宋体]相关[/font][font=Times New Roman]:[/font]
[font=Times New Roman](1)[/font][font=宋体]如果[/font][font=Times New Roman]state[/font][font=宋体]值为[/font][font=Times New Roman]Waiting[/font][font=宋体],那么[/font][font=Times New Roman]wait_time[/font][font=宋体]值无用。[/font][font=Times New Roman]Second_in_wait[/font][font=宋体]值是实际的等待时间[/font][font=Times New Roman]([/font][font=宋体]单位:秒[/font][font=Times New Roman])[/font][font=宋体]。[/font]
[font=Times New Roman](2)[/font][font=宋体]如果[/font][font=Times New Roman]state[/font][font=宋体]值为[/font][font=Times New Roman]Wait unknow time[/font][font=宋体],那么[/font][font=Times New Roman]wait_time[/font][font=宋体]值和[/font][font=Times New Roman]Second_in_wait[/font][font=宋体]值都无用。[/font]
[font=Times New Roman](3)[/font][font=宋体]如果[/font][font=Times New Roman]state[/font][font=宋体]值为[/font][font=Times New Roman]Wait short time[/font][font=宋体],那么[/font][font=Times New Roman]wait_time[/font][font=宋体]值和[/font][font=Times New Roman]Second_in_wait[/font][font=宋体]值都无用。[/font]
[font=Times New Roman](4)[/font][font=宋体]如果[/font][font=Times New Roman]state[/font][font=宋体]值为[/font][font=Times New Roman]Waiting known time[/font][font=宋体],那么[/font][font=Times New Roman]wait_time[/font][font=宋体]值就是实际等待时间[/font][font=Times New Roman]([/font][font=宋体]单位:秒[/font][font=Times New Roman])[/font][font=宋体],[/font][font=Times New Roman]Second_in_wait[/font][font=宋体]值无用。[/font]
[font=Times New Roman] [/font]
页:
[1]