Oracle View Execution Plan issues

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.