Execution plan for the specified statement_id : EXPLAIN PLAN « SQL PLUS Session Environment « Oracle PL/SQL Tutorial






SQL>
SQL> UNDEFINE v_statement_id;
SQL>
SQL> SELECT id ||
  2    DECODE(id, 0, '', LPAD(' ', 2*(level - 1))) || ' ' ||
  3    operation || ' ' ||
  4    options || ' ' ||
  5    object_name || ' ' ||
  6    object_type || ' ' ||
  7    DECODE(cost, NULL, '', 'Cost = ' || position)
  8  AS execution_plan
  9  FROM plan_table
 10  CONNECT BY PRIOR id = parent_id
 11  AND statement_id = '&&v_statement_id'
 12  START WITH id = 0
 13  AND statement_id = '&v_statement_id';
Enter value for v_statement_id:
old  11: AND statement_id = '&&v_statement_id'
new  11: AND statement_id = ''
old  13: AND statement_id = '&v_statement_id'
new  13: AND statement_id = ''

no rows selected

SQL>








29.24.EXPLAIN PLAN
29.24.1.SET AUTOTRACE TRACE EXP and EXPLAIN PLAN output
29.24.2.Explain sql statement
29.24.3.Execution plan for the specified statement_id