Quantcast
Channel: Question and Answer » oracle
Viewing all articles
Browse latest Browse all 717

Oracle and execution plans

$
0
0

I have used the following procedure to view the last execution plan

create or replace procedure display_plan
as
begin
  for c in (select plan_table_output t from table(dbms_xplan.display_cursor('', '', 'allstats advanced last'))) loop
    dbms_output.put_line(c.t);
  end loop;
end;

With dbms_xplan.display_cursor it is possible to specify the SQL_ID. I understand that you can get a list of SQL_IDs from the table V$SQL but how does one decide what ones belong to the current session?


Viewing all articles
Browse latest Browse all 717

Latest Images

Trending Articles



Latest Images