唯一索引引发的行锁

来源:互联网 发布:2017网络新技术 编辑:程序博客网 时间:2024/05/29 18:37
SQL> create table t2(id  int,name char(10));Table created.SQL> create unique index te_idx1 on t2(id);Index created.SQL> select * from v$mystat where rownum<2;       SID STATISTIC#   VALUE---------- ---------- ----------35    0       0SQL> insert into t2 values(1,'a');1 row created.SQL> select * from v$mystat where rownum<2;       SID STATISTIC#   VALUE---------- ---------- ----------36    0       0SQL>  insert into t2 values(1,'b');hang---------        SAMPLE_ID SESSION_ID11670776  3625-2月 -01 12.25.42.878 下午9jgxu7z5wr2dvenq: TX - row lock contention35 insert into t2 values(1,'b')21670775  3625-2月 -01 12.25.41.868 下午9jgxu7z5wr2dvenq: TX - row lock contention35 insert into t2 values(1,'b')31670774  3625-2月 -01 12.25.40.868 下午9jgxu7z5wr2dvenq: TX - row lock contention35 insert into t2 values(1,'b')

0 0
原创粉丝点击