Thanks for the question, Geraldo.
Asked: April 09, 2020 - 3:34 pm UTC
Last updated: April 21, 2020 - 8:07 am UTC
Version: 18.6
Viewed 1000+ times
create or replace procedure test_indexes ( num_runs int ) as start_time pls_integer ; time_taken number ; begin start_time := dbms_utility.get_time (); for i in 1 .. num_runs loop /* YOUR DML STATEMENTS HERE */ end loop; time_taken := ( dbms_utility.get_time () - start_time ) / 100; dbms_output.put_line ( 'Total duration: ' || time_taken || ' seconds; ' || ' seconds/execution: ' || ( time_taken / num_runs ) ) ; end test_indexes; /
exec test_indexes ( 10000 ); truncate table t; exec test_indexes ( 10000 ); truncate table t; exec test_indexes ( 10000 ); -- DROP/CREATE INDEXES and repeat
Geraldo, April 21, 2020 - 2:08 pm UTC
New to good database design? Check out Chris Saxon's full fundamentals class.