AUTOTRACE工具配置

AUTOTRACE工具配置: scott>connect sys/change_on_install 已连接。 scott>@utlxplan 表已创建。 scott>create public synonym plan_table for plan_table; 同义词已创建。 scott>grant all on PLAN_TABLE to public; 授权成功。 创建并授予PLUSTRACE角色 scott>@D:OracleOra81sqlplusadminplustrce.sql scott>grant plustrace to public; 授权成功。[@more@]控制执行计划: set autotrace off 不产生AUTOTRACE报表(默认) set autotrace on explan 报表只会显示优化器执行路径 set autotrace on statistics 报表只显示SQL语句执行统计运算 set autotrace on 报表包括优化期和SQL语句执行统计运算 set autotrace traceonly 类似于set autotrace on 但限制用户查询输出的打印结果 解释执行计划 ---------------- 1、不要在MTS下运行长事务 A: 当一个共享服务器得到请求进行更新或执行一个存储过程时,这个共享服务器在完成任务前专用于此。 在更新完成或存储过程完成之前,没有用户能使用此共巷服务器。 2、使用绑定变量。 -------------- 理解多版本、一致读查询和非阻塞读取的含义 SCOTTb表演示,装载; SQL> @d:oracleora81sqlplusdemodemobld.sql Building demonstration tables. Please wait. Demonstration table build is complete. 从Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production With the Partitioning option JServer Release 8.1.6.0.0 - Production中断开 C:Documents and SettingsAdministrator>sqlplus scott/tiger SQL*Plus: Release 8.1.6.0.0 - Production on 星期四 6月 30 10:05:06 2005 (c) Copyright 1999 Oracle Corporation. All rights reserved. 连接到: Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production With the Partitioning option JServer Release 8.1.6.0.0 - Production SQL> alter table emp add constraint emp_pk primary key(empno); 表已更改。 SQL> alter table dept add constraint dept_pk primary key(deptno); 表已更改。 SQL> alter table emp add constraint emp_fk_dept foreign key(deptno) references dept; 表已更改。 SQL> alter table emp add constraint emp_fk_emp foreign key(mgr) references emp; 表已更改。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/14926/viewspace-804107/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/14926/viewspace-804107/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值