First, describe
The execution plan could not be viewed during the review of the execution plan test, and was found to be dbms_xplan.display because a set autot on was turned on during the test, and after it was closed (set Autot off), the Execute schedule is displayed normally.
Second, the operation process
Sql> sql> explain plan for select COUNT (*) from TT; Explained.elapsed:00:00:00.00sql> Set Lines pages 2000sql> select * FROM table (Dbms_xplan.display ()); 9 Rows Sel Ected. Elapsed:00:00:00.02execution 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----------------------------------------------------------Recursive calls DB block gets ConSistent gets 0 physical reads 0 Redo size 1124 Bytes sent via sql*net to client 519 byt Es received via sql*net from client 2 sql*net roundtrips to/from client 1 sorts (memory) 0 s Orts (disk) 9 rows processed# #上面无法显示执行计划, very strange!!! # #关闭autot, review the execution plan again ok!!! sql> Set Autot offsql> select * FROM table (Dbms_xplan.display ()); Plan_table_ OUTPUT------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------Plan Hash value:3133740314- ------------------------------------------------------------------| Id | Operation | Name | Rows | Cost (%CPU) | Time |-------------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 | 21556 (1) | 00:04:19 | | 1 | SORT AGGREGATE | | 1 | | || 2 | TABLE ACCESS full| TT | 2762k| 21556 (1) | 00:04:19 |-------------------------------------------------------------------9 rows selected. elapsed:00:00:00.02# #解释一下执行计划, the first is to do a full table scan which is easy to understand, sort aggregage because it does the count (*) aggregation. Sql>
Oracle View execution Plan issues