Oracle 参数 OPTIMIZER_ADAPTIVE_REPORTING_ONLY 官方解释,作用,如何配置最优化建议

本站中文解释

OPTIMIZER_ADAPTIVE_REPORTING_ONLY 是Oracle的一个参数,用于控制SQL优化器是否运行在自适应报告模式,默认值为false。

运行在自适应报告模式的 SQL优化器,将在选择执行路径之前,只评估向SQL优化器报告的路径,不会评估可能的更好的路径。

自适应报告模式可以有效改进SQL语句在查询表时的性能,尤其是在查询多个大表时,但会降低其他事务查询执行效果。

若要设置这个参数,可以通过以下SQL语句:

ALTER SESSION SET OPTIMIZER_ADAPTIVE_REPORTING_ONLY = TRUE;

若要恢复默认参数,可以使用这条SQL语句将它设置为false:

ALTER SESSION SET OPTIMIZER_ADAPTIVE_REPORTING_ONLY = FALSE;

官方英文解释

OPTIMIZER_ADAPTIVE_REPORTING_ONLY controls reporting-only mode for adaptive optimizations.

Property Description

Parameter type

Boolean

Default value

FALSE

Modifiable

ALTER SESSION, ALTER SYSTEM

Modifiable in a PDB

Yes

Range of values

TRUE | FALSE

Basic

No

When OPTIMIZER_ADAPTIVE_REPORTING_ONLY is set to FALSE, reporting-only mode is off, and the adaptive optimizations are enabled as usual.

When OPTIMIZER_ADAPTIVE_REPORTING_ONLY is set to TRUE, adaptive optimizations run in reporting-only mode. With this setting, the information required for an adaptive optimization is gathered, but no action is taken to change the plan. For instance, an adaptive plan will always choose the default (optimizer-chosen) plan, but information is collected on what plan to adapt to in non-reporting mode. This information can be viewed in the adaptive plan report.

This parameter affects only adaptive optimizations that are enabled.

See Also:

  • Oracle Database SQL Tuning
    Guide
    for more information about adaptive plans and automatic reoptimization

  • Oracle Database SQL Tuning
    Guide
    for information on controlling adaptive optimization


数据运维技术 » Oracle 参数 OPTIMIZER_ADAPTIVE_REPORTING_ONLY 官方解释,作用,如何配置最优化建议