Use dbms_utility.get_time to do performace check : dbms_utility « System Packages « Oracle PL / SQL






Use dbms_utility.get_time to do performace check

  
SQL>
SQL>

SQL>
SQL> declare
  2   type charListType is table of number index by varchar2(100);
  3   vc charListType;
  4   type numberListType is table of number index by binary_integer;
  5   n numberListType;
  6   t number;
  7   begin
  8       t := dbms_utility.get_time;
  9       for i in 1 .. 1000 loop
 10           n(i) := i;
 11       end loop;
 12       dbms_output.put_line('Index by Number : '|| (dbms_utility.get_time-t));
 13       t := dbms_utility.get_time;
 14       for i in 1 .. 1000 loop
 15           vc(i) := i;
 16       end loop;
 17       dbms_output.put_line('Index by Varchar2: '|| (dbms_utility.get_time-t));
 18   end;
 19  /
Index by Number : 0
Index by Varchar2: 0

PL/SQL procedure successfully completed.

SQL>

   
    
  








Related examples in the same category

1.This script demonstrates DBMS_UTILITY.NAME_TOKENIZE.
2.Use dbms_utility to time
3.time to commit
4.dbms_utility.get_parameter_value
5.Call dbms_utility.get_time twice to time a statement in PL SQL
6.round dbms_utility.get_time
7.Assign dbms_utility.get_time to integer variable
8.dbms_utility.format_error_stack
9.Timing Per Thousand Records Processed (in secs)
10.Timing Package function call
11.use DBMS_UTILITY.FORMAT_ERROR_STACK in a SERVERERROR trigger.
12.DBMS_UTILITY.analyze_schema
13.demonstrates the use of DBMS_UTILITY.TABLE_TO_COMMA and DBMS_UTILITY.COMMA_TO_TABLE.
14.Performace difference between simple parameter and collection parameter