3 Replies Latest reply on Mar 27, 2017 1:09 PM by thatJeffSmith-Oracle

    4.2 EA2 SQL Developer  - SET TIMING ON - ISSUE

    Sanal Krishnan Narayanan

      Hello,

       

      I was running the below script in Sql Developer and noticed that the "Elapsed" timing on the "Script Output" tab seems to be cumulative.

      create or replace procedure proc1

      as

      begin

      for i in 1 .. 10000

      loop

      execute immediate

      'insert into t values ( :y )' using i;

      end loop;

      end;

       

       

      create or replace procedure proc2

      as

      begin

      for i in 1 .. 10000

      loop

      execute immediate

      'insert into t values ( ' || i || ' )' ;

      end loop;

      end;

       

       

      set serverout on size 100000

      set time on

      set timing on

      exec proc1

      exec proc2

      (PS: I selected the above and kept hitting F5 multiple times)

      ----------------------------------------------------

       

       

       

      Procedure PROC1 compiled

       

      Procedure PROC2 compiled

       

      PL/SQL procedure successfully completed.

       

      Elapsed: 00:00:40.977

       

      PL/SQL procedure successfully completed.

       

      Elapsed: 00:00:45.865

       

      PL/SQL procedure successfully completed.

       

      Elapsed: 00:01:13.801

       

      PL/SQL procedure successfully completed.

       

      Elapsed: 00:01:19.177

       

      PL/SQL procedure successfully completed.

       

      Elapsed: 00:01:28.975

       

      PL/SQL procedure successfully completed.

       

      Elapsed: 00:01:38.759

       

      PL/SQL procedure successfully completed.

       

      Elapsed: 00:01:42.291

       

      PL/SQL procedure successfully completed.

       

      Elapsed: 00:01:44.096

       

      PL/SQL procedure successfully completed.

       

      Elapsed: 00:01:45.504

       

      PL/SQL procedure successfully completed.

       

      Elapsed: 00:01:47.110

       

      PL/SQL procedure successfully completed.

       

      Elapsed: 00:01:48.768

       

      PL/SQL procedure successfully completed.

       

      Elapsed: 00:01:50.453

       

      PL/SQL procedure successfully completed.

       

      Elapsed: 00:02:00.200

       

       

      I wrote this post and hit F5 again :

       

      Elapsed: 00:13:15.482

       

      PL/SQL procedure successfully completed.

       

      Elapsed: 00:13:22.987