`

enq: TX - row lock contention

阅读更多

Article by Rampant Author Brian Carr

This is indicative of a session waiting for a row lock held by another session; the amount of wait time associated with this wait event is excessive and can be responsible for performance issues observed in the application. TX enqueue are acquired exclusive when a transaction initiates its first change and held until the transaction does a COMMIT or ROLLBACK.

There are several situations of TX enqueue:

Waits for TX in mode 6 occurs when a session is waiting for a row level lock that is already held by another session. This occurs when one user is updating or deleting a row, which another session wishes to update or delete. This type of TX enqueue wait corresponds to the wait event enq: TX - row lock contention.

To solve this you would have the first session already holding the lock perform a COMMIT or ROLLBACK.

Waits for TX in mode 4 can occur if a session is waiting due to potential duplicates in UNIQUE index. If two sessions try to insert the same key value the second session has to wait to see if an ORA-0001 should be raised or not. This type of TX enqueue wait corresponds to the wait event enq: TX - row lock contention.

To solve this again you have the first session already holding the lock perform a COMMIT or ROLLBACK.

Waits for TX in mode 4 is also possible if the session is waiting due to shared bitmap index fragment. Bitmap indexes index key values and a range of ROWIDs. Each ‘entry’ in a bitmap index can cover many rows in the actual table. If two sessions want to update rows covered by the same bitmap index fragment, then the second session waits for the first transaction to either COMMIT or ROLLBACK by waiting for the TX lock in mode 4. This type of TX enqueue wait corresponds to the wait event enq: TX - row lock contention.

Troubleshooting:

For which SQL currently is waiting on:

select sid, sql_text from v$session s, v$sql q where sid in (select sid from v$session where state in ('WAITING') and wait_class != 'Idle' and event='enq: TX - row lock contention' and (q.sql_id = s.sql_id or q.sql_id = s.prev_sql_id));

The blocking session is:

select blocking_session, sid, serial#, wait_class, seconds_in_wait from v$session where blocking_session is not NULL order by blocking_session;

Recommendation: Evaluate the application to look for these situations via the SQL outlined above to determine where the code can be modified to eliminate possible row lock contention items.

分享到:
评论

相关推荐

    enq:TX index contention.txt

    cause:当插入新的索引条目时,发现索引块中没有足够的空间容纳新的索引条目,索引块就会产生分裂(分为5-5分裂...这时就会表现为enq: TX - index contention。本例中索引块分裂属于5-5 分裂,此分裂可以通过awr报告观察

    enq PS - contention.pdf

    enq PS - contention.pdf enq PS - contention.pdfenq PS - contention.pdf

    BLOG_【AWR分析】Oracle_lhr_队列等待之enq IV - contention案例.pdf

    BLOG_【AWR分析】Oracle_lhr_队列等待之enq IV - contention案例.pdfBLOG_【AWR分析】Oracle_lhr_队列等待之enq IV - contention案例.pdf

    BLOG_【故障处理】Oracle_lhr_队列等待之TX - allocate ITL entry案例.pdf

    BLOG_【故障处理】Oracle_lhr_队列等待之TX - allocate ITL entry案例.pdfBLOG_【故障处理】Oracle_lhr_队列等待之TX - allocate ITL entry案例.pdf

    【故障处理】队列等待之TX 等待事件处理.docx

    队列等待之TX - allocate ITL entry引起的死锁处理 Buffer busy waits异常等待事件分析与处理。 Buffer latch异常等待事件分析与处理。 Db file parallel read异常等待事件分析与处理。 Db file sequential read异常...

    BLOG_Oracle_lhr_ 【等待事件】等待事件系列(5.1)--Enqueue(队列等待) .pdf

    BLOG_Oracle_lhr_ 【等待事件】等待事件系列(5.1)--Enqueue(队列等待) .pdfBLOG_Oracle_lhr_ 【等待事件】等待事件系列(5.1)--Enqueue(队列等待) .pdf

    序列等待事件总结

    BLOG_Oracle_lhr_【等待事件】序列等待事件总结(enq SQ - contention、row cache lock、DFS lock handle和enq SV - contention).pdfBLOG_Oracle_lhr_【等待事件】序列等待事件总结(enq SQ - contention、row ...

    undo引起的告警.txt

    当系统activity增加或者降低的时候,oracle SMON进程会自动ONLINE或者OFFLINE rollback segments。这样导致某些与undo segments相关的latch或者enqueue被...导致系统很多活跃session都开始等待enq: US - contention。

    SECSEmulatorv.zip_BAD_HSMS-SECS_SECS_SECS-II_自动化测试

    ITRI CIM Emulator能够读取SML档案,主要功能是用来测试半导体设备的通讯功能,它支持SECS-I/SECS-II/HSMS-SS通讯协议...Send Non-ENQ Bad Length Byte Bad Checksum T1 Timeout T2 Timeout for Length Byte T4 Timeout

    两因素身份验证客户端-Node.js开发

    安装:npm install -g tfa获得帮助bash-3.2 $ tfa用法:tfa [选项] [命令]命令:enroll-qrcode | enq [选项] 使用qrcode文件进行注册enroll | en [选项] enroll生成| gen [options] [label]生成list | l list delete...

    VMWare7.14汉化补丁

    VU59U-D0E0L-48ENQ-G6WGG-PQUZF 汉化方法: 1.安装原始版本。 2.解压完美汉化包,把汉化文件直接复制到虚拟机文件夹中,替 换原文件即可。 3.替换时,个别文件可能提示无法替换,请在任务管理器中先 结束相应...

    ASCII码表完整版, 从48-0,65-A,97-a,等等日常通用对照表

    ASCII (American Standard Code for Information Interchange) ASCII码大致由以下两部分组成: ...ENQ ACK BEL BS HT LF VT FF CR So SI DLE DCI DC2 DC3 DC4 NAK SYN TB CAN EM SUB ESC FS GS RS Us

    测试:Avelacnum enq testayin REPO

    ИмяпользователяПервое,чтовследуетсделатьпослеустановкиGit —указатьвашеимяиадресэлект。 Этоважно,потомуч...

    linux作业调度C程序

    linux实验 linux 作业调度程序 C语言 源码 可执行文件 enq deq stat

    超详细的字符编码教程

    5 – ENQ – ENQuiry 请求 2.1.2.1.2.6. 6 – ACK – ACKnowledgment 回应/响应 2.1.2.1.2.7. 7 – BEL – [audible] BELl 2.1.2.1.2.8. 8 – BS – BackSpace 退格键 2.1.2.1.2.9. 9 – HT – Horizontal Tab 水平...

    priorityqueuejs:Node.js的简单优先级队列数据结构

    priorityqueue.js Node.js的... enq ( { cash : 250 , name : 'Valentina' } ) ;queue . enq ( { cash : 300 , name : 'Jano' } ) ;queue . enq ( { cash : 150 , name : 'Fran' } ) ;queue . size ( ) ; // 3queue . p

    Python实现队列的方法

    def enQ(): queue.append(raw_input('Enter new string: ').strip()) #调用list的列表的pop()函数.pop(0)为列表的第一个元素 def deQ(): if len(queue) == 0: print 'Cannot pop from an empty queue!' else: ...

    FreeBarcode

    \NUL、\SOH、\STX、\ETX、\EOT、\ENQ、\ACK、\BEL、\BS、\HT、\LF、\VT、\FF、\CR、\SO、\SI、\DLE、 \DC1、\DC2、\DC3、\DC4、\NAK、\SYN、\ETB、\CAN、\EM、\SUB、\ESC、\FS、\GS、\RS、\US 也就是说,这些符号...

    Job-Scheduling:OS实验2, 作业调度

    Job-Scheduling需求说明基本要求和提高要求基本要求:学习源代码,并完成十个调试任务。提高要求:实现多级反馈轮转调度算法多级——多个队列。反馈——优先级会根据等待时间变化轮转——同优先级的作业轮流进行具体...

    遂宁网万事卡学习版 V1.0

    通过该程序,你可以用来销售小量各类数字卡币。 主要功能: 1,采用预存方式时实交易数字卡。便利数字卡网上即使交易的特性。 2,带积分、消费总金额、交易历史等统计功能。 3,客户预存点,可采用发行充值卡方式。...

Global site tag (gtag.js) - Google Analytics