SQL Performance (MOSC)

MOSC Banner

11gR2 : Enable to dispaly explain plan with dbms_xplan.display_cursor !

edited May 23, 2013 5:15AM in SQL Performance (MOSC) 11 commentsAnswered
Hi ,

I try to display explain plan to have number of rows in each step of my MERGE query but I have message : Please verify value of SQL_ID and CHILD_NUMBER;

Thank you.

Best regards.

GD.

set serveroutput on
set time on
set timing on
BEGIN
MERGE /*+ gather_plan_statistics */ INTO PRODUCTS P
USING (...
ON (...)
WHEN MATCHED THEN
  UPDATE SET ...;
dbms_output.put_line(sql%rowcount || ' rows merged. ' );
END ;

SELECT * FROM TABLE(dbms_xplan.display_cursor(NULL,NULL,'ALLSTATS LAST'));
 

PL/SQL procedure successfully completedExecuted in 28,673 seconds10:15:04 SQL> SELECT * FROM TABLE(dbms_xplan.display_cursor(NULL,NULL,'ALLSTATS LAST'));

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center