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

本站中文解释

OPTIMIZER_SECURE_VIEW_MERGING参数控制Oracle是否在优化器计划阶段将覆盖视图合并为基础表来提高查询性能。

OPTIMIZER_SECURE_VIEW_MERGING参数取值:

TRUE:传统行为,在计算密码视图中仅当可以确定数据保密时,才被合并。

FALSE:把所有覆盖视图合并为基本表,不管表中是否包含数据保密信息,允许优化器执行更高效的查询计划。

正确的设置方式:

由于FALSE参数允许优化器生成更高效的查询计划,因此推荐将此参数设置为FALSE。

官方英文解释

OPTIMIZER_SECURE_VIEW_MERGING enables the optimizer to use view merging to improve query performance without performing the checks that would otherwise be performed to ensure that view merging does not violate any security intentions of the view creator.

Property Description

Parameter type

Boolean

Default value

true

Modifiable

ALTER SYSTEM

Modifiable in a PDB

Yes

Range of values

true | false

Basic

No

Oracle RAC

Multiple instances can have different values

Values

  • false

    Oracle Database does not perform security checks that may prevent view merging and predicate move-around.

  • true

    Oracle Database performs checks to ensure that view merging and predicate move-around do not violate any security intentions of the view creator.

To enable the optimizer to use view merging for any query issued by a user, you must grant the MERGE ANY VIEW privilege to the user. Grant the MERGE VIEW privilege to a user on specific views to enable the optimizer to use view merging for queries on these views. These privileges are required only under specific conditions, such as when a view is not merged because the security checks fail.

See Also:

Oracle Database SQL Tuning
Guide
for more information about view merging


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