how oracle explain plan works code example
Example: oracle explain plan
-- Without execution
EXPLAIN PLAN FOR select ...;
SELECT * FROM TABLE(dbms_xplan.display);
-- With execution
SELECT /*+ gather_plan_statistics */ ...;
SELECT * FROM TABLE(dbms_xplan.display_cursor(NULL,NULL,'ALLSTATS LAST'));