今天在使用explain plan for查看
sql执行计划时,出现了如下奇怪的执行计划
经过排查,发现是在使用explain plan for之前执行过set autotrace on,关闭autotrace后执行计划就显示正常,一点小知识,记录以供参考。
- SQL> explain plan for select * from test where object_id = 100;
-
- Explained.
-
- SQL> select * from table(dbms_xplan.display());
-
- 14 rows selected.
-
-
- Execution Plan
- ----------------------------------------------------------
- Plan hash value: 2137789089
-
- ---------------------------------------------------------------------------------------------
- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
- ---------------------------------------------------------------------------------------------
- | 0 | SELECT STATEMENT | | 8168 | 16336 | 29 (0)| 00:00:01 |
- | 1 | COLLECTION ITERATOR PICKLER FETCH| DISPLAY | 8168 | 16336 | 29 (0)| 00:00:01 |
- ---------------------------------------------------------------------------------------------
-
-
- Statistics
- ----------------------------------------------------------
- 14 recursive calls
- 12 db block gets
- 55 consistent gets
- 0 physical reads
- 0 redo size
- 1414 bytes sent via SQL*Net to client
- 519 bytes received via SQL*Net from client
- 2 SQL*Net roundtrips to/from client
- 1 sorts (memory)
- 0 sorts (disk)
- 14 rows processed
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29821678/viewspace-1450562/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29821678/viewspace-1450562/