session1:
create table sync (x int);
begin
for i in 1 .. 10000
loop
insert into sync values (i);
commit work write wait immediate;
end loop;
end;
session2:
select sid,event,p1,p2,p3 from v$session_wait where sid=210;
SID EVENT P1 P2 P3
---------- -------------------------------------------------- ---------- ---------- ----------
210 log file sync 8221 8767982 0
说明:
The default PL/SQL commit behavior for nondistributed transactions is BATCH NOWAIT
默认情况commit=commit work write wait immediate;