PGA、UGAのセッションごとの使用量を算出
以下のSQLを実行
select
sum(decode(sn.name, 'session pga memory', ss.value, NULL)) "PGA USED",
sum(decode(sn.name, 'session uga memory', ss.value, NULL)) ,
(select username from v$session where sid=ss.sid) "USENAME",
ss.sid
from
v$mystat ss,
v$statname sn
where
ss.statistic# = sn.statistic#
and sn.name in ('session pga memory', 'session uga memory')
group by ss.sid;