Connor and Chris will both be at AI World from October 12 to October 17 , the premier Oracle conference of 2025. If you're in Vegas, please come say Hi or pop into our sessions
Thanks for the question.
Asked: September 01, 2018 - 6:15 am UTC
Last updated: September 04, 2018 - 5:34 am UTC
Version: 12c
Viewed 1000+ times
SQL> create or replace 2 procedure slow_proc is 3 x int; 4 s timestamp := systimestamp; 5 begin 6 select 1 into x from dual; 7 dbms_output.put_line('This SQL took '||(systimestamp-s)); 8 s := systimestamp; 9 10 select count(*) into x from dba_objects; 11 dbms_output.put_line('This SQL took '||(systimestamp-s)); 12 s := systimestamp; 13 14 select count(*) into x from dba_objects, scott.emp; 15 dbms_output.put_line('This SQL took '||(systimestamp-s)); 16 s := systimestamp; 17 end; 18 / Procedure created. SQL> sho err No errors. SQL> SQL> set serverout on SQL> exec slow_proc This SQL took +000000000 00:00:00.000000000 This SQL took +000000000 00:00:00.076000000 This SQL took +000000000 00:00:00.151000000 PL/SQL procedure successfully completed.
A reader, September 03, 2018 - 1:34 am UTC
Check out more PL/SQL tutorials on our LiveSQL tool.
PL/SQL reference manual from the Oracle documentation library