explain plan的兩種方式:
一、SQL方式:
explain plan for select count(*) from emp;
select * from table(dbms_xplan.display);
二、AUTOTRACE方式:
開啓set autotrace on 後,提示:
The statistic feature requires that the user is granted select on v_$sesstat, v_$statname and v_$session.
按要求對三個視圖grant select後,還是報錯,還需對v_$mystat也grant select