ITPub博客

首页 > Linux操作系统 > Linux操作系统 > enq: TX - index contention

enq: TX - index contention

原创 Linux操作系统 作者:westzq1984 时间:2009-07-20 21:51:11 0 删除 编辑

看到论坛上有人讨论,研究了下

enq: TX - index contention
     Lock held on an index during a split to prevent other operations on it
--------------------------------------------------------------------------
DROP TABLE test;

CREATE TABLE test(ID CHAR(1000));

CREATE INDEX idx_test ON test(ID);

[oracle10@WESTZQ ~]$ cat run.sh
sqlplus ctais2/oracle <BEGIN
  FOR i IN 1..100000 LOOP
    INSERT INTO test VALUES(to_char(i));
    COMMIT;
  END LOOP;
END;
/
EOF

nohup ./run.sh &
nohup ./run.sh &
nohup ./run.sh &
nohup ./run.sh &
nohup ./run.sh &
nohup ./run.sh &
nohup ./run.sh &

SQL> select event from v$session_wait;

EVENT
----------------------------------------------------------------
SQL*Net message from client
free buffer waits
enq: TX - index contention
SQL*Net message to client
enq: TX - index contention
SQL*Net message from client
enq: TX - index contention
free buffer waits
free buffer waits
free buffer waits
enq: TX - index contention
free buffer waits
SQL*Net message from client
SQL*Net message from client
wait for unread message on broadcast channel
SQL*Net message from client
SQL*Net message from client
SQL*Net message from client
SQL*Net message from client
SQL*Net message from client

EVENT
----------------------------------------------------------------
Streams AQ: qmn slave idle wait
SQL*Net message from client
latch: library cache
SQL*Net message from client
Streams AQ: waiting for messages in the queue
Streams AQ: qmn coordinator idle wait
jobq slave wait
Log archive I/O
rdbms ipc message
SQL*Net message from client
free buffer waits
rdbms ipc message
rdbms ipc message
rdbms ipc message
rdbms ipc message
smon timer
rdbms ipc message
rdbms ipc message
latch: shared pool
rdbms ipc message
rdbms ipc message

EVENT
----------------------------------------------------------------
pmon timer

处理的方法就是反转索引就可以了

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8242091/viewspace-609761/,如需转载,请注明出处,否则将追究法律责任。

下一篇: 段头损坏的处理
请登录后发表评论 登录
全部评论

注册时间:2009-04-06

  • 博文量
    251
  • 访问量
    948384