메뉴 건너뛰기

Korea Oracle User Group

Guru's Articles

원문 : https://sqlmaria.com/2020/10/27/explaining-the-explain-plan-how-to-read-and-interpret-execution-plans/

Explaining the Explain Plan – How to Read and Interpret Execution Plans

 

Examining the different aspects of an execution plan, from cardinality estimates to parallel execution, and understanding what information you should glean from it can be overwhelming even for the most experienced DBA.

That’s why I’ve put together a series of short videos that will walk you through each aspect of the plan and explain what information you can find there and what to do if the plan isn’t what you were expecting.

What is an Execution Plan?

The series starts at the very beginning with a comprehensive overview of what an execution plan is and what information is displayed in each section. After all, you can’t learn to interpret what is happening in a plan, until you know what a plan actually is.

How to Generate an Execution Plan?

Although multiple different tools will display an Oracle Execution Plan for you, there really are only two ways to generate the plan. You can use the Explain Plan command, or you can view the execution plan of a SQL statement currently in the Cursor Cache using the dictionary view V$SQL_Plan. This session covers both techniques for you and provides insights into what additional information you can get the Optimizer to share with you when you generate a plan. It also explains why you don’t always get the same plan with each approach, as I discussed in an earlier post.

How to use DBMS_XPLAN to FORMAT an Execution Plan

The FORMAT parameter within the DBMS_XPLAN.DISPLAY_CURSOR function is the best tool to show you detailed information about a what’s happened in an execution plan including the bind variable values used, the actual number of rows returned by each step, and how much time was spent on each step.  I’ve also covered a lot of the content in this video in a previous post.

Part 2 of the series covers Cardinality Estimates and what you can do to improve them!

Part 3 of the series covers access Methods and what you can do if you don’t get the access method you were expecting.

Part 4 of the series covers Join Methods and when you can expect each one and what to do if you don’t get the join method you were expecting.

Remember you can always get more information on the Oracle Optimizer on the Optimizer team’s blog.

 

번호 제목 글쓴이 날짜 조회 수
공지 Guru's Article 게시판 용도 ecrossoug 2015.11.18 608
24 11.1.0.6 부터 지원하는 Oracle Online Patching New Feature 명품관 2016.04.22 523
23 DDL Logging - 12c (조나단 루이스) 명품관 2016.04.26 1498
22 On ROWNUM and Limiting Results (오라클 매거진 : AskTom) 명품관 2016.04.28 384
21 How to Recover Data (Without a Backup!) 명품관 2016.05.11 1355
20 How to change the database name in 12c 명품관 2016.05.31 1994
19 Can I apply a BP on top of a PSU? Or vice versa? 명품관 2016.06.01 398
18 V$EVENT_NAME 뷰의 Name 컬럼에 정의된 event name에서 오는 오해 명품관 2017.03.08 371
17 Different MOS Notes for xTTS PERL scripts – Use V4 scripts 명품관 2019.01.29 532
16 New Features in Oracle Database 19c 명품관 2019.02.02 544
15 New Features of Backup & Recovery in Oracle Database 19c 명품관 2019.02.07 432
14 New Features in Oracle Multitenant 19c 명품관 2019.02.07 744
13 Patch conflicts 명품관 2019.02.07 974
12 New Features of Security in Oracle Database 19c 명품관 2019.02.08 5049
11 New Features of Data Guard in Oracle Database 19c 명품관 2019.02.08 2004
10 New Features of RAC & ASM in Oracle 19c 명품관 2019.02.08 953
9 New Features of Performance Tuning in Oracle Database 19c 명품관 2019.02.08 918
8 More New Features in Oracle Database 19c 명품관 2019.02.08 6593
7 New initialization parameters, data dictionary views & dynamic performance views in Oracle Database 19c 명품관 2019.02.08 1913
6 SQL Tuning Workshop 명품관 2020.02.20 8158
5 SQL Window Functions Cheat Sheet 명품관 2020.05.26 440
위로