You could also look at v$pgastat.
orcl> select sum(value) from v$sesstat where statistic# = (select statistic# from v$statname where name='session pga memory'); SUM(VALUE) ---------- 76814912 orcl> select sum(pga_alloc_mem) pga from v$process; PGA ---------- 46878926 orcl>
select (sga+pga)/1024/1024 as "sga_pga" from (select sum(value) sga from v$sga), (select sum(pga_alloc_mem) pga from v$process)
select decode( grouping(nm), 1, 'total', nm ) nm, round(sum(val/1024/1024)) mb from ( select 'sga' nm, sum(value) val from v$sga union all select 'uga', sum(a.value) from v$sesstat a, v$statname b where b.name = 'session uga memory' and a.statistic# = b.statistic# union all select 'pga', sum(a.value) from v$sesstat a, v$statname b where b.name = 'session pga memory' and a.statistic# = b.statistic# ) group by rollup(nm);
show parameter target
972145 wrote:Your target is 6448M = 1024*1024*6448 bytes = 6761218048 which is very close to the result your are getting. Given that there is no read consistency in these views and the state of the instance is always changing, I would say this is as close as you are likely to get.
Thanks but memory_max_target is 6448 MB but if use the query from the link, the summation is like 6752 MB which is more than memory_max_target.
Request you to please clarify.