oracle 直接建索引锁表

重建索引锁表:

Session 1:


SQL> select * from v$mystat where rownum<2;

       SID STATISTIC#	   VALUE
---------- ---------- ----------
	12	    0	       0



Session 2:

SQL> select * from v$mystat where rownum<2;

       SID STATISTIC#	   VALUE
---------- ---------- ----------
       191	    0	       0


Session 1:

alter index IDX_WARECOUNTD_GOODID rebuild;




Session 2:

insert into test values(199,'aaa');

原文地址:https://www.cnblogs.com/hzcya1995/p/13348382.html