Oracle 参数 OPTIMIZER_INDEX_COST_ADJ 官方解释,作用,如何配置最优化建议
本站中文解释
OPTIMIZER_INDEX_COST_ADJ参数是调整优化器比较索引和全表扫描时,索引的开销与扫描的开销比例的参数,默认值是100。此参数可以设置为大于100,表示查询索引全表扫描的成本比较,优先考虑使用索引;如果设置小于100,则会提高全表扫描的开销权重,从而使优化器更有可能优化查询语句时用全表扫描。
正确的设置该参数,应根据实际的查询语句和表结构进行调整,可以在性能监控的基础上,调整理想的OPTIMIZER_INDEX_COST_ADJ值,以便获得最优的查询语句执行效果。
官方英文解释
OPTIMIZER_INDEX_COST_ADJ
lets you tune optimizer behavior for access path selection to be more or less index friendly—that is, to make the optimizer more or less prone to selecting an index access path over a full table scan.
Property | Description |
---|---|
Parameter type |
Integer |
Default value |
|
Modifiable |
|
Modifiable in a PDB |
Yes |
Range of values |
1 to 10000 |
Basic |
No |
The default for this parameter is 100 percent, at which the optimizer evaluates index access paths at the regular cost. Any other value makes the optimizer evaluate the access path at that percentage of the regular cost. For example, a setting of 50 makes the index access path look half as expensive as normal.
Note:
The adjustment does not apply to user-defined cost functions for domain indexes.
See Also:
Oracle Database SQL
Language Reference for additional information about this initialization parameter