What do you mean by "calculating the size of PGA"? If you mean how to determine the size of the PGA for current sessions then look at V$SESSTAT.
For current PGA size of each session, use:
SELECT s.sid, n.name, s.value FROM v$sesstat s, v$statname n
WHERE s.statistic# = n.statistic#
AND n.name = 'session pga memory';
For maximum PGA size each session has reached so far, use:
SELECT s.sid, n.name, s.value FROM v$sesstat s, v$statname n
WHERE s.statistic# = n.statistic#
AND n.name = 'session pga memory max';
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?