text ORCL - PGA

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text ORCL - PGA相关的知识,希望对你有一定的参考价值。

Estimation de la PGA initiale avant recommandation de l'advisor
OLTP: PGA_AGGREGATE_TARGET = (total_mem * 80%) * 20%
DSS: PGA_AGGREGATE_TARGET = (total_mem * 80%) * 50% 

Sinon pour voir votre PGA et ses besoins:
set lines 200
col OPERATION format a20
SELECT
to_number(decode(SID, 65535, NULL, SID)) sid,
operation_type OPERATION,
trunc(WORK_AREA_SIZE/1024/1024) WSIZE, 
trunc(EXPECTED_SIZE/1024/1024) ExpectedSize,
trunc(ACTUAL_MEM_USED/1024/1024) ActualMemUsed, 
trunc(MAX_MEM_USED/1024/1024) Mem_Max_Util, 
number_passes Pass,
trunc(TEMPSEG_SIZE/1024/1024) TSIZE
FROM v$sql_workarea_active
ORDER BY 1,2;

	Si EXPECTED_SIZE < ACTUAL_MEM_USED  Trop
	Si EXPECTED_SIZE > ACTUAL_MEM_USED  Pas assez

Sort
-- Localisation des tris
SELECT name, value
FROM v$sysstat
WHERE name like 'sort%'
UNION
-- % de Tri sur Disque 
SELECT 'disk sort percent', TRUNC(a.value/(a.value+b.value)*100,2)
FROM v$sysstat a, v$sysstat b
WHERE a.name = 'sorts (disk)'
AND b.name = 'sorts (memory)'
UNION
-- Lignes par tri 
SELECT 'rows per sort', TRUNC(c.value/(a.value+b.value))
FROM v$sysstat a, v$sysstat b, v$sysstat c
WHERE a.name = 'sorts (disk)'
AND b.name = 'sorts (memory)'
AND c.name = 'sorts (rows)';

	Le ratio doit être < 5% si OLTP sinon agrandir la SORT_AREA_SIZE
	Le ratio doit être < 1% si OLTP sinon agrandir la SORT_AREA_SIZE

Hash
SELECT s.sid, u.segtype, blocks
FROM v$sort_usage u, v$session s
WHERE u.session_addr = s.saddr;
SID SEGTYPE BLOCKS
---------- --------- ----------
8 HASH 13311
22 SORT 128
40 HASH 13311
44 HASH 13311


	Si on a beaucoup de has join, augmenter hash_area_size.
	Si on a beaucoup de sort join, augmenter sort_area_size.

以上是关于text ORCL - PGA的主要内容,如果未能解决你的问题,请参考以下文章

text ORCL - UNDO

text ORCL - 索引

text ORCL - 监听器日志

text ORCL - Afficher un datafile

text ORCL - 闪回查询

text ORCL - DéplacerunDatafile