SQL>
SQL> create or replace procedure do_mod
2 as
3 cnt number := 0;
4 begin
5 dbms_profiler.start_profiler( 'mod' );
6
7 for i in 1 .. 500000
8 loop
9 cnt := cnt + 1;
10 if ( mod(cnt,1000) = 0 )
11 then
12 commit;
13 end if;
14 end loop;
15
16 dbms_profiler.stop_profiler;
17 end;
18 /
Procedure created.
SQL>
SQL> create or replace procedure no_mod
2 as
3 cnt number := 0;
4 begin
5 dbms_profiler.start_profiler( 'no mod' );
6 for i in 1 .. 500000
7 loop
8 cnt := cnt + 1;
9 if ( cnt = 1000 )
10 then
11 commit;
12 cnt := 0;
13 end if;
14 end loop;
15 dbms_profiler.stop_profiler;
16 end;
17 /
Procedure created.
SQL>
SQL>
SQL>
|