oracle 9i启用Execution Plan的方法

主要有四步:
1.创建表,通过utlxplan.sql脚本
SQL> @?/rdbms/admin/utlxplan.sql
2. 创建同义词为了多个用户可以共享一个plan_table 并授权给public
SQL> create public synonym plan_table for plan_table;
SQL> grant all on plan_table to public;
3.创建plustrace 角色
        关 键 词:  
主要有四步:


1.创建表,通过utlxplan.sql脚本
SQL> @?/rdbms/admin/utlxplan.sql
2. 创建同义词为了多个用户可以共享一个plan_table 并授权给public
SQL> create public synonym plan_table for plan_table;
SQL> grant all on plan_table to public;
3.创建plustrace 角色
SQL> @?/sqlplus/admin/plustrce.sql 执行这个脚本就可以了。
4、将角色权限授予public
sql>grant plustrace to public;
完成以上几步就可以使用autotrace 功能
set timing on --显示执行时间
set autotrace on 查看执行计划和查询信息
set autotrace traceonly 只显示执行计划,但不显示查询输出


Recursive Calls

递归调用统计数据是指由于你需要执行其他SQL语句而必须执行的SQL.例如,如果你执行了一个插入
语句,它触发了一个运行某查询的触发器,它就是递归SQL.
例如:
select * from sfis1.test4321
alter system flush shared_pool;

打開 autotrace on 就能比較到

posted on 2010-06-21 11:25  ILoveDBA  阅读(703)  评论(0编辑  收藏  举报