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

本站中文解释

Oracle提供了INMEMORY_EXPRESSIONS_USAGE参数,它可以控制可以存储在Oracle In-Memory表中的表达式的量。该参数允许在表进入In-Memory存储之前,将表达式添加到查询性能优化中以实现动态缓存。

INMEMORY_EXPRESSIONS_USAGE参数可以设置为两个值–FORCE和AUTOMATIC。

当参数设置为FORCE时,表空间中的所有表达式都将添加到表的索引缓存中,以便在运行时将查询性能优化操作应用于表。

当参数设置为AUTOMATIC时,Oracle In-Memory会将表的表达式添加到缓存中,并自动优化Oracle表的性能。此参数对于具有非常复杂的查询语句的数据库尤其有用。

因此,要正确设置INMEMORY_EXPRESSIONS_USAGE参数,请首先根据系统需求来确定要在In-Memory表中存储的表达式的数量,然后根据实际情况设置参数。如果需要确保In-Memory表中存储索引大量表达式,请使用FORCE参数,而如果不需要添加大量表达式,可以使用AUTOMATIC参数自动优化Oracle表。

官方英文解释

INMEMORY_EXPRESSIONS_USAGE controls which In-Memory Expressions (IM expressions) are populated into the In-Memory Column Store (IM column store) and are available for queries.

Property Description

Parameter type

String

Syntax

INMEMORY_EXPRESSIONS_USAGE = { STATIC_ONLY | DYNAMIC_ONLY | ENABLE | DISABLE }

Default value

ENABLE

Modifiable

ALTER SYSTEM

Modifiable in a PDB

Yes

Basic

No

Oracle RAC

The same value must be used on all instances.

The four values for this parameter are:

  • STATIC_ONLY: Tables enabled for in-memory and containing certain data types such as Oracle numbers or JSON will have these columns populated in the IM column store using a more efficient representation. Note that this setting will increase the in-memory footprint for some tables. A static configuration enables the IM column store to cache OSON (binary JSON) columns, which are marked with an IS_JSON check constraint. Internally, an OSON column is a hidden virtual column named SYS_IME_OSON. In contrast, a dynamic configuration automatically creates and populates frequently used expressions.

  • DYNAMIC_ONLY: IM expressions will be automatically created and populated into the IM column store, if used in conjunction with PL/SQL procedure DBMS_INMEMORY.IME_CAPTURE_EXPRESSIONS. Note that setting this value will increase the in-memory footprint for some tables.

  • ENABLE: Both static and dynamic IM expressions will be populated into the IM column store and available to be used by queries. Note that setting this value will increase the in-memory footprint for some tables. This is the default value.

  • DISABLE: No IM expressions of any kind will be populated into the IM column store.

Changing the mode of a parameter does not have an immediate effect on existing in-memory data. For example, if the inmemory_expressions_usage clause is changed from DYNAMIC_ONLY to DISABLE, the stored IM expressions are not immediately removed. The next repopulation will not bring back the expressions in memory, thereby effectively removing the expressions.

See Also:

  • “INMEMORY_VIRTUAL_COLUMNS”

  • Oracle Database In-Memory
    Guide
    for more information about IM expressions

  • Oracle Database PL/SQL
    Packages and Types Reference
    for more information about the DBMS_INMEMORY PL/SQL package


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