Aggregate PGA usage for all sessions in v$session
Hi Oracle Gurus,
If I want to calculate the total amount of PGA used by a session, can I use the following query to find it and which figures should I add up to get the value of total PGA used by the session? Do you have a better way to figure it out? My requirement is I want to set an alert at my PGA usage level and if it exceeds a certain value (say 80%), I want myself to be alerted.
Query:
---------
select s.sid, name, value/1024/1024 value_mb from v$session s, v$sesstat ss, v$statname sn