正德厚生,臻于至善

Sizing the PGA in Oracle

--How To Determine PGA , Olap Page Pool Hit / Miss Ratio and Size by User(Doc ID 353211.1)
select gvs.username, gvs.sid,
       round(pga_used_mem/1024/1024,2)||' MB' pga_used,
       round(pga_max_mem/1024/1024,2)||' MB' pga_max,
       round(pool_size/1024/1024,2)||' MB' olap_pp,
       round(100*(pool_hits-pool_misses)/pool_hits,2)||'%' olap_ratio
  from gv$process gvp, gv$session gvs, gv$aw_calc gva
 where session_id=gvs.sid and addr = paddr;
--Sizing the PGA in Oracle 19c - How to Account for the MGA Size (Doc ID 2808761.1)
show parameter pga
set lines 200 pages 50000;
col resource_name for a40;
select * from gv$resource_limit where resource_name='processes';

set lines 200 pages 50000;
col resource_name for a40;
select max(max_utilization) from gv$resource_limit where resource_name='processes';

col max_pga for 99999999.9
select value/1024/1024 max_pga from v$pgastat where name='maximum PGA allocated' minus
     select value/1024/1024 max_pga from v$pgastat where name='MGA allocated (under PGA)';
select ((select value/1024/1024 max_pga from v$pgastat where name='maximum PGA allocated' minus select value/1024/1024 max_pga from v$pgastat where name='MGA allocated (under PGA)') + ((select max(max_utilization) from gv$resource_limit where resource_name='processes') * 5)) * 1.1 PGA_MB from dual;
赞(0) 打赏
未经允许不得转载:徐万新之路 » Sizing the PGA in Oracle

评论 抢沙发

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫

微信扫一扫

登录

找回密码

注册