出现的问题:
SQL> set autot trace on;
SP2-0618: 无法找到会话标识符。启用检查 PLUSTRACE 角色
SP2-0611: 启用 STATISTICS 报告时出错
SP2-0618: 无法找到会话标识符。启用检查 PLUSTRACE 角色
SP2-0611: 启用 STATISTICS 报告时出错
解决办法:1 conn /as sysdba
SQL> @D:\app\QiLin\product\11.2.0\dbhome_1\sqlplus\admin\plustrce.sql
2 授权
SQL> grant plustrace to scott;
SQL> @D:\app\QiLin\product\11.2.0\dbhome_1\sqlplus\admin\plustrce.sql
2 授权
SQL> grant plustrace to scott;
3 开启
SQL> set autot on;
SQL> set timing on;
SQL> set autot on;
SQL> set timing on;
4 查询
SQL> select * from emp;
已选择14行。
SQL> select * from emp;
已选择14行。
已用时间: 00: 00: 00.03
执行计划
----------------------------------------------------------
Plan hash value: 3956160932
----------------------------------------------------------
Plan hash value: 3956160932
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 14 | 1218 | 3 (0)| 00:00:01 |
| 1 | TABLE ACCESS FULL| EMP | 14 | 1218 | 3 (0)| 00:00:01 |
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 14 | 1218 | 3 (0)| 00:00:01 |
| 1 | TABLE ACCESS FULL| EMP | 14 | 1218 | 3 (0)| 00:00:01 |
--------------------------------------------------------------------------
Note
-----
- dynamic sampling used for this statement (level=2)
-----
- dynamic sampling used for this statement (level=2)
统计信息
----------------------------------------------------------
0 recursive calls
0 db block gets
8 consistent gets
0 physical reads
0 redo size
1455 bytes sent via SQL*Net to client
416 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
14 rows processed
SQL>
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/20976446/viewspace-706163/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/20976446/viewspace-706163/