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实用程序
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/