enq: TX
今天,收到客户的邮件说上周每天早上10点多,数据库都会有很多锁,收集了下客户的AWR信息,发现排在TOP5第二位的就是enq: TX - row lock contention。
SQL> select SESSION_ID,SESSION_SERIAL#,SQL_ID v$active_session_history where event='enq: TX - row lock contention';
SESSION_ID SESSION_SERIAL# SQL_ID
---------- --------------- -------------
514 34342 6drpquxz79cyv
808 25670 6drpquxz79cyv
...
...
sql_id为6drpquxz79cyv的输出5.8万多行,时间基本都是上午10:30.
根据SQL_ID在AWR报告中找到了对应的SQL语句
SQL Id SQL Text
6drpquxz79cyv INSERT INTO I_STORE_ORDER_DETAIL(SEQ_ID, STORE_ORDER_CODE, STORE_ORDER_ID, GOODS_ID, PAY_CONTRACT_CODE, GOODS_CODE, GATTR1, GATTR2, GATTR3, GATTR4, GATTR5, PURCHASE_TYPE, WAREHOUSE_CODE, UNIT_PRICE, QTY, CUSTOMER_CODE, PURCHASE_CONTRACT_CODE, SALE_CONTRACT_CODE, WEIGHT, PIECE, DEPARTMENT_USER, REMARK, CREATE_PERSON, CREATE_DATE, UPDATE_PERSON, UPDATE_DATE, S_VERSION, S_FROM_SYSTEM_ID, S_TO_SYSTEM_ID, S_METHOD_TYPE) VALUES( :1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, :14, :15, :16, :17, :18, :19, :20, :21, :22, :23, :24, :25, :26, :27, :28, :29, :30 )
客户也不知道这个SQL具体是做什么的,而且这个SQL只能通过修改应用来优化,目前客户正在分析此SQL。
相关新闻>>
- 发表评论
-
- 最新评论 更多>>