enqueue lock wait等待事件

简介:

Enqueues are sophisticated locks for managing access to shared resources like tables, rows, jobs, and redo threads. An enqueue can be requested in different levels/mode: null, row share, row exclusive, share, share row exclusive or exclusive. This wait event indicates a wait for a lock that is held by another session (or sessions) in an incompatible mode to the requested mode. Isolating contention: Once an enqueue resource contention problem has been identified with Ignite, one can quickly isolate the SQL and sessions that are suffering. Often, the SQL is a good clue to what objects have locking contention. During a period of time when locking is typically a problem, use the following query to find out what session is requesting a lock, the type and mode of the requested lock and the session that is blocking. SELECT DECODE(request,0,'Holder: ','Waiter: ')||sid sess, id1, id2, lmode, request, type FROM V$LOCK WHERE (id1, id2, type) IN (SELECT id1, id2, type FROM V$LOCK WHERE request>0) ORDER BY id1, request; Solutions There are many types of locks in Oracle and each has a unique contention remedy. The following are the most common sources of contention: TX



本文转自maclean_007 51CTO博客,原文链接:http://blog.51cto.com/maclean/1277924

相关文章
|
安全 Java 调度
多线程锁sync+lock使用,@Async使用
多线程锁sync+lock使用,@Async使用
多线程锁sync+lock使用,@Async使用
|
19天前
|
API
wait-nofity
wait-nofity
19 0
|
8月前
|
存储 缓存 安全
|
Oracle 关系型数据库 数据库
innodb_lock_wait_timeout参数的了解
前言:在管理ORACLE的工作中,经常发现因为锁等待的原因导致应用宕机了。Mysql考虑到自身的性能和架构等因素,InnoDB数据库引擎增加了参数innodb_lock_wait_timeout,避免在资源有限的情况下产生太多的锁等待; 一、innodb_...
3006 0
|
关系型数据库 数据库 索引