v$pgastat can be queried for PGA memory usage statistics.
select
name,
case unit
when 'bytes' then to_char(value / 1024/1024, '999,990') || ' mb'
when 'percent' then to_char(value , '9999990') || ' %'
else to_char(value , '9999990')
end val,
con_id
from
v$pgastat
order by
lower(name);
PGA statistic names
v$pgastat records the following statistics:
aggregate PGA auto target
Alwas equal to select to_number(value) from v$parameter where name like 'pga_aggregate_target' ?
aggregate PGA target parameter
bytes processed
cache hit percentage
extra bytes read/written
global memory bound
maximum MGA allocated
maximum PGA allocated
maximum PGA used for auto workareas
maximum PGA used for manual workareas
MGA allocated (under PGA)
over allocation count
PGA memory freed back to OS
process count
The number of processes that were active during the last three seconds. Compare with select count(*) from v$process.
max processes count
recompute count (total)
total freeable PGA memory
total PGA allocated
total PGA inuse
total PGA used for auto workareas
total PGA used for manual workareas
TODO
select sum(pga_used_mem) from v$process union all
select value from v$pgastat where name = 'total PGA inuse';
select sum(pga_alloc_mem) from v$process union all
select value from v$pgastat where name = 'total PGA allocated';