Oracle 视图 V$LATCH 官方解释,作用,如何使用详细说明
本站中文解释
:
Oracle视图V$LATCH是用来观察系统当前使用的锁定何时拥有者和等待者的视图.也就是说它可以把系统中正处于锁定状态的会话和等待被释放锁定的会话,以及两者之间的关系可视化出来.V$LATCH可以帮助数据库管理人员检测到出现死锁的时间,检测死锁的原因,以及排除死锁问题.
要使用Oracle视图V$LATCH,首先用SQL文件获取该表的对象ID,然后可以使用以下语句在该表上执行查询:
SELECT * FROM v$latch WHERE latch# = ;
其中, 为要查询的锁的对象ID.通过查询,可以查看锁的等待时间,被加锁的会话、正在等待的会话,以及其他有关锁定信息.
官方英文解释
V$LATCH
displays aggregate latch statistics for both parent and child latches, grouped by latch name.
Individual parent and child latch statistics are broken down in the views V$LATCH_PARENT
and V$LATCH_CHILDREN
.
Column | Datatype | Description |
---|---|---|
|
|
Address of the latch object |
|
|
Latch number |
|
|
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_CHILDREN”
-
“V$LATCH_PARENT”