Dbms_xplan.display_cursor Oracle 10g View Execution Plan __oracle

Source: Internet
Author: User


View execution plans that have executed SQL

First, grab one of the most IO-consuming SQL in the last hour.

SELECT sql_id, COUNT (*)
from Gv$active_session_history Ash, gv$event_name evt
WHERE ash.sample_time > SYSDATE-1/24 and
ash.session_state = ' waiting ' and
ash.event_id = evt.event_id and
evt.wait_class = ' User i/ O '
GROUP by sql_id ORDER by
COUNT (*) DESC;

View SQL Execution Plan

SELECT * from TABLE (dbms_xplan.display_cursor (' 51f3uqkpv1fja '));

sql_id 51f3uqkpv1fja, child number 0-------------------------------------SELECT t1.name grade_0, T1.name grade_1 ,: "Sys_b_0" grade_2,: "Sys_b_1" grade_3,: "Sys_b_2" grade_4,: "Sys_b_3" grade_5,: "SY S_b_4 "Grade_6,:" Sys_b_5 "grade_7," Sys_b_6 "Grade_8, T1. Abbrev Abbrname, T1. AdditionalInfo, T1. COVERAGE, T1. Gissiteid, T1. Nongissiteid, T1. ALIAS, T1. Servicegrade, T1.comments, T1.id, T1. Regioncode, T1. Longitude, T1. Latitude, T1. Mapitemid, T1. Importtime,: "Sys_b_7" Impflag, T1. STATUS, T1. Isautoconfigure, T1. Adslbandwidth, T1. Lanbandwidth, T1. Ftthbandwidth from Bizc_standardaddress T1 to start with t1.id =: "Sys_b_8" Connect by t1.id= T1. Parentaddressid Plan Hash value:3601985599----------------------------------------------------------------------- ------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU) |
Time |   -----------------------------------------------------------------------------------------------------
| 0 |                      SELECT STATEMENT |       |       |  |          4565 (100) |   |
|  1 |                      CONNECT by without Filtering|       |       |            |          |   |
|   2 | TABLE ACCESS by INDEX rowid|       bizc_standardaddress |       |            |          |    | |* 3 | INDEX UNIQUE SCAN |     sys_c00139211 |     1 |     8 | 2 (0) |   00:00:01 | |   4 | TABLE ACCESS Full |   bizc_standardaddress |    778k|  92m| 4565 (1) |
00:00:55 | -----------------------------------------------------------------------------------------------------predicate Information (identified by Operation ID):---------------------------------------------------3-access ("T1".)
 
 ID "=:sys_b_8)


Related Article

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.