oracle autotrace

1、开启会话跟踪
set autotrace on;


2、执行sql
select * from ep_bill where bill_id='10000003'


Execution Plan
----------------------------------------------------------
Plan hash value: 236855796


-----------------------------------------------------------------------------
| Id  | Operation         | Name    | Rows  | Bytes | Cost (%CPU)| Time     |
-----------------------------------------------------------------------------
|   0 | SELECT STATEMENT  |         |  5060 |  9611K|   124K  (1)| 00:24:57 |
|*  1 |  TABLE ACCESS FULL| EP_BILL |  5060 |  9611K|   124K  (1)| 00:24:57 |
-----------------------------------------------------------------------------


Predicate Information (identified by operation id):
---------------------------------------------------


   1 - filter("BILL_ID"=10000003)


Note
-----
   - dynamic sampling used for this statement (level=2)




Statistics
----------------------------------------------------------
         23  recursive calls
          0  db block gets
     459265  consistent gets
     459402  physical reads
         72  redo size
       1945  bytes sent via SQL*Net to client
        519  bytes received via SQL*Net from client
          2  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
          1  rows processed
          
3、autotrace实用程序的选项


on                  描写查询结果、执行计划和统计数据
on statistic          显示查询结果和统计数据,但不包括执行计划
on explain            显示查询结果和执行计划,但不包括统计数据
traceonly             显示执行计划和统计数据,但不显示结果
traceonly statistics  仅显示统计数据,不包括执行计划
off                   关闭autotrace实用程序

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

转载于:http://blog.itpub.net/29076828/viewspace-1196176/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值