CBO Cost Formulas成本計算公式大全: 成本模型:連線方式Join method 注意 連線基數(Join Cardinality)不受到連線方式(join method) 的影響, oracle中主要的三種join method HASH JOIN、Nested Loops、Sort Merge:
- Nested Loops巢狀迴圈成本公式:
- Cost(outer)+Cost(inner))*cardinality(outer)
- Sort merge 合併排序連線成本公式:
- Cost(outer) + Cost(inner) + Sort(outer) + Sort(inner)
- Hash Join 雜湊連線公式:
- Cost(outer) + Cost(inner) + Build(outer) + Probe(inner)
- BLEVEL = number of branch levels in index
- add +1 for leaf block
- FF = filtering factor – selectivity
- LFBL = number of leaf blocks
- CLUF = index clustering factor
- OIC = optimizer_index_caching(default 0)
- OICA = optimizer_index_cost_adj parameter(default=100)