Oracle自带的profsum.sql产生的结果示例
Innovation
|
1#
Innovation 发表于 2006-10-18 22:08
Oracle自带的profsum.sql产生的结果示例
已更新2行。
PL/SQL 过程已成功完成。 GRAND_TOTA ---------- 1560.57 RUNID RUN_COMMENT SECONDS ------- ----------- ---------- 1 no mod 643.964701 2 mod 1158.1919 RUNID RUN_COMMENT UNIT_OWNER UNIT_NAME SECONDS PERCEN ------- ----------- ----------- -------------- --------- ------ 1 no mod SCOTT NO_MOD 506.44 78.6 2 mod SCOTT DO_MOD 1054.13 91.0 UNIT_OWNER UNIT_NAME SECONDS PERCENTAG ----------- -------------- --------- --------- SCOTT DO_MOD 1054.13 67.55 SCOTT NO_MOD 506.44 32.45 未选定行 未选定行 SECONDS UNIT_OWNER UNIT_NAME LINE# TEXT -------- ----------- -------------- ------ --------------------- 709.7 SCOTT DO_MOD 8 if ( mod(cnt,1000) = 0 ) 171.4 SCOTT NO_MOD 8 if ( cnt = 1000 ) 160.3 SCOTT NO_MOD 7 cnt := cnt + 1; 158.5 SCOTT DO_MOD 5 for i in 1 .. 500000 155.0 SCOTT NO_MOD 5 for i in 1 .. 500000 147.3 SCOTT DO_MOD 7 cnt := cnt + 1; 38.6 SCOTT DO_MOD 10 commit; 19.4 SCOTT NO_MOD 10 commit; 已选择8行。 PL/SQL 过程已成功完成。 未选定行 未选定行 LINES_EXECUTED -------------- 0 LINES_PRESENT ------------- 0 =================================trace info================================= ===========================Results for run #1 made on 24-7月 -06 17:04:39 ========================= (no mod) Run total time: 643.96 seconds Unit #1: SCOTT.NO_MOD - Total time: 506.44 seconds 1 procedure no_mod as 2 0 0 cnt number := 0; 3 begin 4 0 0 dbms_profiler.start_profiler( 'no mod' ); 5 500,001 154.96648 .00030993 for i in 1 .. 500000 6 loop 7 500,000 160.32336 .00032064 cnt := cnt + 1; 8 500,000 171.38172 .00034276 if ( cnt = 1000 ) 9 then 10 500 19.431397 .03886279 commit; 11 500 .33597007 .00067194 cnt := 0; 12 end if; 13 end loop; 14 1 .0034496 .0034496 dbms_profiler.stop_profiler; 15 end; ===========================Results for run #2 made on 24-7月 -06 17:04:50 ========================= (mod) Run total time: 1158.19 seconds Unit #1: SCOTT.DO_MOD - Total time: 1054.13 seconds 1 procedure do_mod as 2 0 0 cnt number := 0; 3 begin 4 0 0 dbms_profiler.start_profiler( 'mod' ); 5 500,001 158.52169 .00031704 for i in 1 .. 500000 6 loop 7 500,000 147.34272 .00029468 cnt := cnt + 1; 8 500,000 709.65247 .00141930 if ( mod(cnt,1000) = 0 ) 9 then 10 500 38.609054 .07721810 commit; 11 end if; 12 end loop; 13 1 .00322387 .00322387 dbms_profiler.stop_profiler; 14 end; ============================================================================ PL/SQL 过程已成功完成。 ================== Profiler report - all runs rolled up =================== Unit SCOTT.DO_MOD: 1 procedure do_mod as 2 0 0 cnt number := 0; 3 begin 4 0 0 dbms_profiler.start_profiler( 'mod' ); 5 500,001 158.52169 .00031704 for i in 1 .. 500000 6 loop 7 500,000 147.34272 .00029468 cnt := cnt + 1; 8 500,000 709.65247 .00141930 if ( mod(cnt,1000) = 0 ) 9 then 10 500 38.609054 .07721810 commit; 11 end if; 12 end loop; 13 1 .00322387 .00322387 dbms_profiler.stop_profiler; 14 end; Unit SCOTT.NO_MOD: 1 procedure no_mod as 2 0 0 cnt number := 0; 3 begin 4 0 0 dbms_profiler.start_profiler( 'no mod' ); 5 500,001 154.96648 .00030993 for i in 1 .. 500000 6 loop 7 500,000 160.32336 .00032064 cnt := cnt + 1; 8 500,000 171.38172 .00034276 if ( cnt = 1000 ) 9 then 10 500 19.431397 .03886279 commit; 11 500 .33597007 .00067194 cnt := 0; 12 end if; 13 end loop; 14 1 .0034496 .0034496 dbms_profiler.stop_profiler; 15 end; ============================================================================ PL/SQL 过程已成功完成。 |