ORACLE执行计划标示符无效

前端之家收集整理的这篇文章主要介绍了ORACLE执行计划标示符无效前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1、drop table PLAN_TABLE ;

2、拷贝D:\app\client\Steven\product\12.1.0\client_1\RDBMS\ADMIN\utlxplan.sql里的sql语句,去掉sharing=none

3、SETAUTOTRACEON

sql> SET AUTOTRACE ON
sql> SELECT SYSDATE FROM DUAL;

SYSDATE
--------------
15-10月-16


执行计划
----------------------------------------------------------
Plan hash value: 1388734953

-----------------------------------------------------------------
| Id  | Operation        | Name | Rows  | Cost (%cpu)| Time     |
-----------------------------------------------------------------
|   0 | SELECT STATEMENT |      |     1 |     2   (0)| 00:00:01 |
|   1 |  FAST DUAL       |      |     1 |     2   (0)| 00:00:01 |
-----------------------------------------------------------------


统计信息
----------------------------------------------------------
          1  recursive calls
          0  db block gets
          0  consistent gets
          0  physical reads
          0  redo size
        531  bytes sent via sql*Net to client
        520  bytes received via sql*Net from client
          2  sql*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
          1  rows processed@H_403_21@ 

2、Toad查看计划


接着输入sql语句按CTRL+E即可

原文链接:https://www.f2er.com/oracle/212263.html

猜你在找的Oracle相关文章