dbms_profiler.start_profiler : DBMS_PROFILER « System Packages « Oracle PL/SQL Tutorial






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>








31.20.DBMS_PROFILER
31.20.1.DBMS_PROFILER.get_version
31.20.2.Capture DBMS_PROFILER information for the specified script
31.20.3.Demonstrate DBMS_PROFILER
31.20.4.dbms_profiler.start_profiler
31.20.5.Use DBMS_PROFILER to compare the performance differences between row-at-a-time processing and bulk processing
31.20.6.Profiler for recursive function
31.20.7.Call dbms_profiler.start_profiler to start profiler