关于v$db_object_cache的一些脚本

找出在 library cache中所需空间大于100k的PL/SQL对象

select name,sharable_mem,loads from v$db_object_cache
where sharable_mem>102400 and type in
('PACKAGE','PACKAGE BODY','FUNCTION','PROCEDURE')
and kept='NO';

如果loads较高,那么将其keep到library cache中。

找出TOP 5 loads的对象,考虑将其keep到library cache中。

select * from (select name,sharable_mem,type,loads from v$db_object_cache where kept='NO' and type is not null
order by loads desc ) where rownum<6;

 

暂时就这么多....发现了继续补充。

原文地址:https://www.cnblogs.com/hehe520/p/6330640.html