Sunday, February 17, 2019

SQL plan monitor while query executing

STEP-1) Get sql_id from v$sql_monitor
SELECT sql_id FROM  v$sql_monitor;

STEP-2) Get the plan details
 SELECT sid,
  sql_id,
  status,
  plan_line_id,
  plan_operation,
  plan_options, 
  output_rows 
FROM v$sql_plan_monitor
--WHERE status not like 'DONE%'
 ORDER BY sid,plan_line_id;

No comments:

Post a Comment