Explain plan in oracle - Query execution

Execute this statement first and tag the entire query execution with the explain plan ID 'result1'::
explain plan SET STATEMENT_ID = 'result1' for select * from psworklist

Next step: Execute this query to see how the results are actually fetched by oracle::

SELECT cardinality "Rows",
lpad(' ',level-1)operation' '
options' 'object_name "Plan"
FROM PLAN_TABLE
CONNECT BY prior id = parent_id
AND prior statement_id = statement_id
START WITH id = 0
AND statement_id = 'result1'
ORDER BY id;

No comments:

Post a Comment