0

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?

asked Feb 20, 2024 at 19:44
3
  • 2
    Does this answer your question? Oracle How to get Execution Plan for SQL executed inside of PLSQL? Commented Feb 20, 2024 at 20:58
  • unfortunately it doesn't because i want the execution plan for the PLSQL code, not SQL. since my function has in and out parameters, i cannot call it embedded in sql select my_f(...) from dual, i have to call it in pl/sql Commented Feb 21, 2024 at 13:57
  • There is no "execution plan for the PLSQL code" Commented Feb 21, 2024 at 15:08

1 Answer 1

0

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.

answered Feb 21, 2024 at 9:01
1
  • when i tried to run exec dbms_profiler.start_profiler; i got Error 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? Commented Feb 21, 2024 at 14:01

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.