What are Cardinality Estimates in Oracle?

Sdílet
Vložit
  • čas přidán 23. 07. 2024
  • 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 both table and column level statistics as input. It's considered the most important aspect of an execution plan because it strongly influences all of the other decisions the optimizer makes.
    In this video, 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 and what additional information you can force Oracle to display in the execution, so you can figure out what is going on.
    TOC
    What is a cardinality estimate? 0.12
    How is a cardinality estimate calculated? 0.25
    Why should I care about cardinality estimates? 1:35
    How to identify cardinality estimates in a plan 2:10
    How to confirm a cardinality estimate is accurate? 2:28
    How to use GATHER_PLAN_STATISTICS hint 3:28
    E-Rows versus A-rows columns in the plan table 3:48
    Starts column in the plan table 4:33
    Buffers column in the plan table 5:31
    Memory information in the plan 5:39
    Parallel execution cardinality estimates 6:11
  • Věda a technologie

Komentáře • 5