Oracle 视图 V$LATCH_CHILDREN 官方解释,作用,如何使用详细说明
本站中文解释
Oracle视图V$LATCH_CHILDREN是一个动态视图,可以用来查看各类Latch子进程的信息,其中包括执行中的子进程、等待状态的子进程以及正在分配资源的子进程。在系统资源出现负载不均衡时,可以从V$LATCH_CHILDREN视图中把握进程状况。
使用V$LATCH_CHILDREN视图的办法如下:
(1)查看进程的pid
查看当前系统中的所有pid,可以执行:
SELECT sid,pid FROM v$latch_children;
(2)查看进程的执行进度
查看某个进程的执行进度,可以执行:
SELECT sid,pid,percent_complete FROM v$latch_children WHERE pid=&pid;
其中&pid指的是进程的pid。
(3)查看进程是否被阻塞
查看某个进程是否被阻塞,可以执行:
SELECT sid,pid,blocking_pid FROM v$latch_children WHERE pid=&pid;
其中&pid指的是进程的pid。 若blocking_pid为0,说明该进程没有被阻塞。
官方英文解释
V$LATCH_CHILDREN
displays statistics about child latches.
This view includes all columns of V$LATCH
plus the CHILD#
column. Note that child latches have the same parent if their LATCH#
columns match each other.
Column | Datatype | Description |
---|---|---|
|
|
Address of the latch object |
|
|
Latch number of the parent latch |
|
|
Child latch number (unique only to each parent latch) |
|
|
Latch level |
|
|
Latch name |
|
|
Latch hash |
|
|
Number of times the latch was requested in willing-to-wait mode |
|
|
Number of times the latch was requested in willing-to-wait mode and the requester had to wait |
|
|
Number of times a willing-to-wait latch request resulted in a session sleeping while waiting for the latch |
|
|
Number of times a latch was requested in no-wait mode |
|
|
Number of times a no-wait latch request did not succeed (that is, missed) |
|
|
This column has been deprecated and is present only for compatibility with previous releases of Oracle. No data is accumulated for this column; it will always have a value of zero. |
|
|
This column has been deprecated and is present only for compatibility with previous releases of Oracle. No data is accumulated for this column; it will always have a value of zero. |
|
|
Willing-to-wait latch requests which missed the first try but succeeded while spinning |
|
|
These columns have been deprecated and are present only for compatibility with previous releases of Oracle. No data is accumulated for these columns; they will always have a value of zero. As a substitute for these columns you can query the appropriate rows of the |
|
|
Elapsed time spent waiting for the latch (in microseconds) |
|
|
The ID of the container to which the data pertains. Possible values include:
|
See Also:
“V$LATCH”