enqueue lock wait等待事件
原创
©著作权归作者所有:来自51CTO博客作者maclean_007的原创作品,请联系作者获取转载授权,否则将追究法律责任
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
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
聊聊TCP中的TIME_WAIT
TIME_WAIT 的产生、作用以及优化
TIME_WAIT