In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
I. description
In the process of viewing the execution plan test, it was encountered that the execution plan could not be viewed using dbms_xplan.display. It was found that the execution plan could be displayed normally after the set autot on was opened during the test and closed (set autot off).
II. Operation process
SQL > SQL > explain plan for select count (*) from tt;Explained.Elapsed: 00:00:00.00SQL > set lines 200 pages 2000SQL > select * from table (dbms_xplan.display ()) 9 rows selected.Elapsed: 00:00:00.02Execution Plan---Plan hash value: 2137789089 Murray- -| 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 1124 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 Execution plan cannot be displayed on sorts (disk) 9 rows processed## It's strange! # # close autot and check the execution plan again! SQL > set autot offSQL > select * from table (dbms_xplan.display ()) PLAN_TABLE_OUTPUT- -Plan hash value: 3133740314 muri- -| 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.02 rows selected.Elapsed # explain the execution plan The first is to do a full table scan, which is easy to understand, and sort aggregage is because of the count (*) aggregation. SQL >
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.