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

本站中文解释

RESULT_CACHE_MAX_TEMP_SIZE参数是Oracle 11g处理结果缓存的重要参数。原理是,在执行查询语句时,将取得的结果存放到临时表上,再从这个结果表中取出,这样就可以提高查询效率,避免了重新执行。

RESULT_CACHE_MAX_TEMP_SIZE参数用来指定结果缓存中可以存放的最大的结果集的尺寸,值的单位是字节。当查询生成的结果集大于这个参数设置的值时,就会产生异常,查询将无法执行。

为了执行效率,更安全的做法是在不超出系统的硬件资源的情况下,为这个参数设置足够大的值,但不要设置太大,以免系统发生崩溃而无法正常运行。

官方英文解释

RESULT_CACHE_MAX_TEMP_SIZE specifies the maximum amount of temporary tablespace (in bytes) that can be consumed by the result cache.

Property Description

Parameter type

Big integer

Syntax

RESULT_CACHE_MAX_TEMP_SIZE = integer [K | M | G]

Default value

RESULT_CACHE_SIZE * 10

Modifiable

ALTER SYSTEM

Modifiable in a PDB

Yes

Range of values

0 to operating system-dependent

Basic

No

Oracle RAC

You must either set this parameter to 0 on all instances to disable the result cache, or use a nonzero value on all instances. Disabling the result cache on some instances may lead to incorrect results.

If you attempt to set this parameter to a value that is less than 5% of the size of the SGA, then this parameter will be set to 5% of the size of the SGA. If you attempt to set this parameter to a value that is more than 10% of the current total unused space available for temporary tablespaces in the SYS schema, then this parameter will be set to 10% of the current total unused space available for temporary tablespaces in the SYS schema.

If the value of this parameter is 0, then the result cache is disabled for the PDB.

Note:

This parameter is available starting with Oracle Database 21c.

See Also:

Oracle Database
Performance Tuning Guide
for information about tuning the result cache


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