QUERY_REWRITE_INTEGRITY

QUERY_REWRITE_INTEGRITY determines the degree to which Oracle must enforce query rewriting. At the safest level, Oracle does not use query rewrite transformations that rely on unenforced relationships.

Property Description
Parameter type String
Syntax QUERY_REWRITE_INTEGRITY = { enforced | trusted | stale_tolerated }
Default value enforced
Modifiable ALTER SESSION, ALTER SYSTEM
Modifiable in a PDB Yes
Basic No
Oracle RAC Multiple instances can have different values.

QUERY_REWRITE_INTEGRITY is relevant for materialized views as well as for foreign key constraints in NOVALIDATE state.

Values

If a foreign key constraint is in NOVALIDATE state, join elimination is not done when QUERY_REWRITE_INTEGRITY=enforced. This means that queries with joins over a foreign key constraint that is in RELY NOVALIDATE state can potentially take longer to parse and execute as the optimizer does not trust the RELY.

See Also: