Statistics
The cost of any particular portion of an execution plan depends on the composition of the target data structures. The cost-based optimizer uses statistics about the data (e.g., information about the size and uniqueness of data in tables and indexes) to create optimal execution plans.
The types of statistics used by the cost-based optimizer are shown in Table 17-2.
Table 17-2. Statistics used by cost-based analyzer
|
Entity |
Type of statistic |
|---|---|
|
Table |
Number of rows Number of blocks Number of unused blocks Average available free space per block Number of chained rows Average row length Remote average row length |
|
Column |
Number of distinct values per column (cardinality) Remote cardinality Second lowest column value Second highest column value Column density factor Number of NULLs for the column Data distribution factor |
|
Index |
Depth of index B*-tree structure Number of leaf blocks Number of distinct values Average number of leaf blocks per key Average number of data blocks per key Clustering factor |
|
System |
I/O performance and utilization (new in Oracle9i) CPU performance and utilization (new in Oracle9i) |