pga_aggregate_target
Target total memory for all sessions' private work areas (sorts, hash joins, bitmap merges).
- 기본값
10MB or 20% of SGA- Range
- 10MB up to 4096GB minus 1
- Restart needed
- 아니요
- Default checked on
- Oracle AI Database 26ai / 23ai
기능
A target, not a limit: Oracle sizes each work area so the total stays near it and spills to temp when it cannot. V$PGA_TARGET_ADVICE estimates the effect of other sizes.
기본값
10MB or 20% of SGA. 10MB or 20% of the SGA, whichever is greater (Oracle 23ai/26ai). Oracle Free sets 512MB. Inside a PDB it must be smaller than the root's value.
Check the current value
SHOW PARAMETER pga_aggregate_target SELECT name, value, isdefault, issys_modifiable, isses_modifiable, ispdb_modifiable FROM v$parameter WHERE name = 'pga_aggregate_target';
Change it
ALTER SYSTEM SET pga_aggregate_target = 2G 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$SQL_WORKAREA_HISTOGRAM shows many one-pass or multi-pass executions, or temp spills dominate reports.
What can go wrong
Too large lets PGA grow past physical memory before pga_aggregate_limit stops it.
The closest setting on other engines
| 엔진 | 설정 | 기본값 | Restart |
|---|---|---|---|
| Oracle |
pga_aggregate_target this page
|
10MB or 20% of SGA |
아니요 |
| PostgreSQL |
work_mem
|
4MB |
아니요 |
| MySQL |
sort_buffer_size
|
256KB |
아니요 |
Questions about pga_aggregate_target
What is the default value of pga_aggregate_target in Oracle?
10MB or 20% of SGA. 10MB or 20% of the SGA, whichever is greater (Oracle 23ai/26ai). Oracle Free sets 512MB. Inside a PDB it must be smaller than the root's value.
Does changing pga_aggregate_target 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 pga_aggregate_target?
When V$SQL_WORKAREA_HISTOGRAM shows many one-pass or multi-pass executions, or temp spills dominate reports.
Back to all Oracle settings, or check the Oracle manual for every option.
Check pga_aggregate_target 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.