consider this working pl/sql block:
declare
o_result boolean;
io_error varchar2(30000);
tab1 someTable1;
tab2 someTable2;
begin
tab1(1).col1 := 'str';
tab1(1).col2 := 1;
tab2(1).col1 := 'str';
tab2(1).col2 := 0.5;
tab2(1).col3 := 6;
o_result := some_function(io_error, 2,'str', 5, to_date('01-JAN-23','DD-MON-YY'), to_date('31-DEC-23','DD-MON-YY'), 4, 'A', tab1, tab2, 'str', 'B', 'str');
end;
how to get the explain plan for pl/sql function calls where its inputs are dates and custom types?
1 Answer 1
SQL and PL/SQL are different languages, different engines.
SQL is declarative and you can use explain plan, tuning advisor and other tools for this for SQL.
PL/SQL is imperative and the tool you're looking for is DBMS_PROFILER
.
DBMS_PROFILER
The package provides an interface to profile existing PL/SQL applications and identify performance bottlenecks. You can then collect and persistently store the PL/SQL profiler data.
-
when i tried to run
exec dbms_profiler.start_profiler;
i gotError executing PL/SQL profiler *Cause: An error occurred in during execution of a PL/SQL profiler procedure
. do you have any working example to be used in SQLDeveloper client?gabriel119435– gabriel1194352024年02月21日 14:01:58 +00:00Commented Feb 21, 2024 at 14:01
Explore related questions
See similar questions with these tags.
select my_f(...) from dual
, i have to call it in pl/sql