메뉴 건너뛰기

Korea Oracle User Group

Guru's Articles

원문 : https://sqlmaria.com/2020/11/03/explain-the-explain-plan-cardinality-estimates/

 

 

Explain the Explain Plan: Cardinality Estimates

In last week’s post, I began a series on how to read and interpret Oracle execution plans by explaining what an execution plan is and how to generate one. This week I’m going to tackle the most important piece of information the Optimizer shares with you via the execution plan, it’s cardinality estimates.

What is a Cardinality Estimate?

A cardinality estimate is the estimated number of rows, the optimizer believes will be returned by a specific operation in the execution plan. The Optimizer determines the cardinality for each operation based on a complex set of formulas that use table and column level statistics as input (or the statistics derived by dynamic sampling). It’s considered the most important aspect of an execution plan because it strongly influences all of the other decisions the optimizer makes.

In part 4 of our series, I share some of the formulas used by the optimizer to estimate cardinalities, as well as showing you how to identify cardinalities in a plan. I also demonstrate multiple ways to determine if the cardinality estimates are accurate.

What can cause a Cardinality Misestimate and how do I fix it?

Several factors can lead to incorrect cardinality estimates even when the basic table and column statistics are up to date. In part 5 of our series, I explain the leading causes of cardinality misestimates and how you can address them.

Next weeks, instalment will be all about the different access methods available to the Optimizer and what you can do to encourage the optimizer to select the access method you want!

Don’t forget this series also covers, how to read an explain plan as well as the different join methods and join orders.

Don’t forget more information on the Oracle Optimizer can always be found on the Optimizer blog.

번호 제목 글쓴이 날짜 조회 수
공지 Guru's Article 게시판 용도 ecrossoug 2015.11.18 1153
45 Virtual Classroom Seminar #19: Move to Oracle 23ai - Everything about Multitenant - PART 1 명품관 2024.06.07 156
44 Explain the Explain Plan: Join Methods 명품관 2021.02.10 857
43 Explain the Explain Plan: Access Methods 명품관 2021.02.10 1048
» Explain the Explain Plan: Cardinality Estimates 명품관 2021.02.09 736
41 Explaining the Explain Plan – How to Read and Interpret Execution Plans 명품관 2021.02.09 567
40 SQL Window Functions Cheat Sheet 명품관 2020.05.26 508
39 SQL Tuning Workshop 명품관 2020.02.20 8268
38 New initialization parameters, data dictionary views & dynamic performance views in Oracle Database 19c 명품관 2019.02.08 2015
37 More New Features in Oracle Database 19c 명품관 2019.02.08 6702
36 New Features of Performance Tuning in Oracle Database 19c 명품관 2019.02.08 1030
35 New Features of RAC & ASM in Oracle 19c 명품관 2019.02.08 1070
34 New Features of Data Guard in Oracle Database 19c 명품관 2019.02.08 2126
33 New Features of Security in Oracle Database 19c 명품관 2019.02.08 5172
32 Patch conflicts 명품관 2019.02.07 1064
31 New Features in Oracle Multitenant 19c 명품관 2019.02.07 794
30 New Features of Backup & Recovery in Oracle Database 19c 명품관 2019.02.07 525
29 New Features in Oracle Database 19c 명품관 2019.02.02 686
28 Different MOS Notes for xTTS PERL scripts – Use V4 scripts 명품관 2019.01.29 765
27 V$EVENT_NAME 뷰의 Name 컬럼에 정의된 event name에서 오는 오해 명품관 2017.03.08 441
26 Can I apply a BP on top of a PSU? Or vice versa? 명품관 2016.06.01 460
위로