// oracle · memory

db_cache_size

Minimum size of the default buffer pool, the cache for blocks of the standard block size.

Padrão
0
Range
0, or a value inside the SGA up to sga_max_size
Restart needed
Não
Default checked on
Oracle AI Database 26ai / 23ai

O que faz

With sga_target or memory_target set, an explicit value is a floor for automatic tuning. The KEEP and RECYCLE pools and the db_nK_cache_size caches for non-default block sizes sit outside it and are never auto-tuned. Inside a PDB it reserves a minimum buffer cache for that PDB, below the root's value.

Valor padrão

0. 0, so ASMM or AMM sizes the cache when sga_target or memory_target is set (Oracle 23ai/26ai).

Check the current value

SHOW PARAMETER db_cache_size

SELECT name, value, isdefault, issys_modifiable, isses_modifiable, ispdb_modifiable
FROM v$parameter
WHERE name = 'db_cache_size';

Change it

ALTER SYSTEM SET db_cache_size = 4G SCOPE=BOTH;

No restart: ALTER SYSTEM with SCOPE=BOTH applies immediately and is saved in the SPFILE. It can be set inside a PDB (ISPDB_MODIFIABLE = TRUE).

When to change it

When V$DB_CACHE_ADVICE shows a larger cache would cut physical reads and automatic sizing keeps giving the memory away, or to pin a minimum for a PDB.

What can go wrong

A floor sized on one busy day can strand SGA the shared pool needs during a parse spike, so keep part of the cache auto-tuned.

Questions about db_cache_size

What is the default value of db_cache_size in Oracle?

0. 0, so ASMM or AMM sizes the cache when sga_target or memory_target is set (Oracle 23ai/26ai).

Does changing db_cache_size require a restart?

No. No restart: ALTER SYSTEM with SCOPE=BOTH applies immediately and is saved in the SPFILE. It can be set inside a PDB (ISPDB_MODIFIABLE = TRUE).

When should I change db_cache_size?

When V$DB_CACHE_ADVICE shows a larger cache would cut physical reads and automatic sizing keeps giving the memory away, or to pin a minimum for a PDB.

Back to all Oracle settings, or check the Oracle manual for every option.

// one client for every engine

Check db_cache_size 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.

Texto e dados desta página: CC BY 4.0, com crédito ao SQLly (sqlly.app). Código e trechos SQL: MIT. Detalhes da licença