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

本站中文解释

Oracle参数DB_CACHE_ADVICE是在Oracle 9i中引入的一个参数,用来控制内存分配策略。它决定了 Oracle 使用高速缓存或相应的内存区,以优化其I/O总线。

DB_CACHE_ADVICE 参数有三种可用设置:

FORCE:强迫Oracle使用高速缓存。如果不可能,则放弃此设置,系统不会报错。

なおNEVER:表示不要使用高速缓存区。

そしてKEEP:表示保持当前设置,可以使用高速缓存区,但不强迫使用。

正确的设置方式:

1.查看当前DB_CACHE_ADVICE的设置

可以使用下面的命令来查看当前DB_CACHE_ADVICE的设置情况:

SELECT * FROM V$PARAMETER WHERE NAME=’db_cache_advice’;

2.更改DB_CACHE_ADVICE设置

如果需要更改DB_CACHE_ADVICE设置,则需要使用下面的命令:

ALTER SYSTEM SET DB_CACHE_ADVICE={ FORCE | KEEP | NEVER } SCOPE={ MEMORY | SPFILE };

官方英文解释

DB_CACHE_ADVICE enables or disables statistics gathering used for predicting behavior with different cache sizes through the V$DB_CACHE_ADVICE performance view.

Property Description

Parameter type

String

Syntax

DB_CACHE_ADVICE = { ON | READY | OFF }

Default value

If STATISTICS_LEVEL is set to TYPICAL or ALL, then ON

If STATISTICS_LEVEL is set to BASIC, then OFF

Modifiable

ALTER SYSTEM

Modifiable in a PDB

No

Basic

No

Values

  • OFF

    Advisory is turned off and the memory for the advisory is not allocated.

  • READY

    Advisory is turned off but the memory for the advisory remains allocated. Allocating the memory before the advisory is actually turned on avoids the risk of an error when you switch the parameter to ON.

    If the parameter is switched to this state from ON, the contents of the view are preserved and the memory for the advisory is retained.

    If the parameter is switched to this state from OFF, you may get an error.

  • ON

    Advisory is turned on. CPU and memory overheads are incurred. Attempting to set the parameter to this state when it is already in the OFF state may result in an error. Otherwise, the view (V$DB_CACHE_ADVICE) is reset and statistics are gathered to the newly refreshed view.

    If the parameter is in the READY state, you can set it to ON without any errors because the memory is already allocated. The view is reset and statistics are displayed in the newly refreshed view.

See Also:

“V$DB_CACHE_ADVICE”


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