result_cache_mode
Which queries use the server result cache.
- По умолчанию
MANUAL- Range
- MANUAL, FORCE, MANUAL_TEMP, FORCE_TEMP
- Restart needed
- Нет
- Default checked on
- Oracle AI Database 26ai / 23ai
Что оно делает
MANUAL caches only queries with the RESULT_CACHE hint or tables annotated RESULT_CACHE (MODE FORCE). FORCE caches every eligible query.
Значение по умолчанию
MANUAL. MANUAL (Oracle 23ai/26ai).
Check the current value
SHOW PARAMETER result_cache_mode SELECT name, value, isdefault, issys_modifiable, isses_modifiable, ispdb_modifiable FROM v$parameter WHERE name = 'result_cache_mode';
Change it
ALTER SESSION SET result_cache_mode = FORCE; -- this session ALTER SYSTEM SET result_cache_mode = FORCE SCOPE=BOTH;
No restart: ALTER SYSTEM with SCOPE=BOTH applies immediately and is saved in the SPFILE. A session can also change its own value with ALTER SESSION. It can be set inside a PDB (ISPDB_MODIFIABLE = TRUE).
When to change it
Keep MANUAL and hint the specific lookup queries that are read often and change rarely.
What can go wrong
FORCE on a write-heavy system causes latch contention on the result cache and constant invalidation.
Questions about result_cache_mode
What is the default value of result_cache_mode in Oracle?
MANUAL. MANUAL (Oracle 23ai/26ai).
Does changing result_cache_mode require a restart?
No. No restart: ALTER SYSTEM with SCOPE=BOTH applies immediately and is saved in the SPFILE. A session can also change its own value with ALTER SESSION. It can be set inside a PDB (ISPDB_MODIFIABLE = TRUE).
When should I change result_cache_mode?
Keep MANUAL and hint the specific lookup queries that are read often and change rarely.
Back to all Oracle settings, or check the Oracle manual for every option.
Check result_cache_mode on your own server
SQLly runs the query above against Oracle and the other engines in this reference, from one desktop app on macOS, Windows and Linux.