Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Asynchronous Commit in Oracle Database 10g R2
On Fri, 02 Sep 2005 16:14:13 +0000, Jonathan Lewis wrote:
>
declare
i integer;
begin
for i in 1..10000
loop
insert into a values(i);
commit;
end loop;
end;
/
Sure enough, redo synch writes was 1.
With the DB link pointing to the local instance (using IPC adapter)
and inserting into a_at_local instead of just inserting into a, the number
skyrocketed to 10001. It was done on Oracle 9.2. User commits was counted
properly and was 20000 (two executions). Timing of the two executions was
slightly different:
SQL> truncate table a reuse storage;
Table truncated.
Elapsed: 00:00:00.23
SQL> get /tmp/ins1
1 declare
2 i integer;
3 begin
4 for i in 1..10000
5 loop
6 insert into a values(i);
7 commit;
8 end loop;
9* end;
SQL> /
PL/SQL procedure successfully completed.
Elapsed: 00:00:18.62
SQL> get /tmp/ins
1 declare
2 i integer;
3 begin
4 for i in 1..10000
5 loop
6 insert into a_at_local values(i);
7 commit;
8 end loop;
9* end;
SQL> /
PL/SQL procedure successfully completed.
Elapsed: 00:00:57.65
SQL>
$ tnsping local
TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 02-SEP-2005 22:20:09
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
/oracle/product/10g/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = 10g)) (CONNECT_DATA = (SERVICE_NAME = oracle) (SERVER = DEDICATED)))
OK (60 msec)
$
My suspicion is that if I used TCP adapter instead of IPC, the time difference would be even more drastic. Interestingly enough, Oracle doesn't show time spent in waiting for commits. Here is the output of select from V$SESSION_EVENT
EVENT TOTAL_WAITS TIME_WAITED AVERAGE_WAIT MAX_WAIT SQL*Net message from client 3 1 .23 0 SQL*Net message to client 4 0 0 0
It looks like some important timings are not shown in the traditional tables we all might be inclined to look.
-- http://www.mgogala.comReceived on Fri Sep 02 2005 - 21:27:09 CDT
![]() |
![]() |