Question: How can see the RAM used
by a SQL query?
Answer: The
Oracle PGA RAM is used by SQL for sorting, hash joins and
storing SQL intermediate result sets.
This script will display
the RAM for a specific SQL statement.
Also see
RAM used in SQL execution plan step and
RAM used by session.
You can also see all RAM used by a specific user ID:
select
username,
name,
value
from
v$session
join
v$sesstat using (sid)
join
v$statname using
(statistic#)
where
name = 'session pga memory'
and
username='MYUSER';