explain plan的两种方式:
一、SQL方式:
explain plan for select count(*) from emp;
select * from table(dbms_xplan.display);
二、AUTOTRACE方式:
开启set autotrace on 后,提示:
Unable to gather statistics please unsure user has correct access.
The statistic feature requires that the user is granted select on v_$sesstat, v_$statname and v_$session.
The statistic feature requires that the user is granted select on v_$sesstat, v_$statname and v_$session.
按要求对三个视图grant select后,还是报错,还需对v_$mystat也grant select
ExplainPlan使用详解
本文介绍了Oracle数据库中ExplainPlan的两种使用方式:SQL方式和AUTOTRACE方式,并详细探讨了在使用AUTOTRACE时可能遇到的权限问题及解决方法。
1409

被折叠的 条评论
为什么被折叠?



