Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1446088
  • 博文数量: 239
  • 博客积分: 5909
  • 博客等级: 大校
  • 技术积分: 2715
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-24 20:19
文章分类

全部博文(239)

文章存档

2014年(4)

2013年(22)

2012年(140)

2011年(14)

2010年(59)

我的朋友

分类: Oracle

2013-12-10 11:42:18

Autotrace Setting  Result

SET AUTOTRACE OFF


No AUTOTRACE report is generated. This is the default.


SET AUTOTRACE ON EXPLAIN


The AUTOTRACE report shows only the optimizer execution path.


SET AUTOTRACE ON STATISTICS


The AUTOTRACE report shows only the SQL statement execution statistics.


SET AUTOTRACE ON


The AUTOTRACE report includes both the optimizer execution path and the SQL statement execution statistics.


SET AUTOTRACE TRACEONLY


Similar to SET AUTOTRACE ON, but suppresses the printing of the user's query output, if any. If STATISTICS is enabled, query data is still fetched, but not printed.


Setups Required for the Autotrace Report

To use this feature, the PLUSTRACE role must be granted to the user, such as HR. DBA privileges are required to grant the PLUSTRACE role.

Additionally, a PLAN_TABLE table must be created in the user's schema, such as the HR schema. For information on creating the PLAN_TABLE, see .

To create the PLUSTRACE role and grant it to the DBA, run the commands in from a SQL*Plus session.

Example 11-1 Creating the PLUSTRACE Role

CONNECT / AS SYSDBA 
@$ORACLE_HOME/SQLPLUS/ADMIN/PLUSTRCE.SQL 
drop role plustrace; 
Role dropped. 
create role plustrace; 
Role created. 
grant plustrace to dba with admin option; 
Grant succeeded.  

To grant the PLUSTRACE role to the HR user, run the commands in from a SQL*Plus session.

Example 11-2 Granting the PLUSTRACE Role

CONNECT / AS SYSDBA 
GRANT PLUSTRACE TO HR; 
Grant succeeded.
Database Statistic Name  Description

recursive calls


Number of recursive calls generated at both the user and system level. Oracle maintains tables used for internal processing. When Oracle needs to make a change to these tables, it internally generates an internal SQL statement, which in turn generates a recursive call.


db block gets


Number of times a CURRENT block was requested.


consistent gets


Number of times a consistent read was requested for a block.


physical reads


Total number of data blocks read from disk. This number equals the value of "physical reads direct" plus all reads into buffer cache.


redo size


Total amount of redo generated in bytes.


bytes sent via SQL*Net to client


Total number of bytes sent to the client from the foreground processes.


bytes received via SQL*Net from client


Total number of bytes received from the client over Oracle Net.


SQL*Net roundtrips to/from client


Total number of Oracle Net messages sent to and received from the client.


sorts (memory)


Number of sort operations that were performed completely in memory and did not require any disk writes.


sorts (disk)


Number of sort operations that required at least one disk write.


rows processed


Number of rows processed during the operation.


阅读(901) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~