博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
v$db_object_cache
阅读量:4052 次
发布时间:2019-05-25

本文共 1179 字,大约阅读时间需要 3 分钟。

-----------------
记录在share_pool中library cache中的对象信息
SQL> desc v$db_object_cache
 Name            Type
--------------- --------------------
OWNER           VARCHAR2(64)        --对象所有者
NAME            VARCHAR2(1000)       --对象名
DB_LINK         VARCHAR2(64)
NAMESPACE       VARCHAR2(28)               --应该也是对象类型,没有确认
TYPE            VARCHAR2(28)               --对象类型(sequence,procedure,function,package,package body,trigger)
SHARABLE_MEM    NUMBER                     --在共享池中占用的空间
LOADS           NUMBER           --被加载次数
EXECUTIONS      NUMBER            --执行次数
LOCKS           NUMBER           --当前所定对象的session数
PINS            NUMBER           --当前执行对象的session数
KEPT            VARCHAR2(3)                --对象是否常驻内存中,即是否使用dbms_shared_pool.keep固定
CHILD_LATCH     NUMBER                     --子latch
 
通过查询v$db_object_cache可以确认出library cache中频繁加载的对象,或者占用内存比较多的对象
并根据实际情况进行优化
如果频繁加载的话可以使用dbms_share_pool包中的keep功能将对象keep到内存中
同时可以根据统计观察library_cache的使用
--查看是否用对象被keep到share_pool中
select type,kept,count(*) from v$db_object_cache group by type,kept order by count(*),kept;
--查看目前library_cache中所有对象总大小
select sum(SHARABLE_MEM)/1024/1024 m from v$db_object_cache;
--查看library_cache中占用空间比较大,并且没有被keep到内存中的对象
select owner,name,sharable_mem,kept from v$db_object_cache where sharable_mem>102400 and kept ='NO' order by sharable_mem;
--查看library_cache中频繁重新加载的对象
select owner,name,sharable_mem,kept,loads from v$db_object_cache order by loads;

转载地址:http://sjtci.baihongyu.com/

你可能感兴趣的文章
UVa 712 - S-Trees
查看>>
UVa 327 - Evaluating Simple C Expressions
查看>>
UVa 699 - The Falling Leaves 二叉树的落叶
查看>>
UVa 297 - Quadtrees 四叉树, 及其在编码图像的应用
查看>>
UVa 10562 - Undraw the Trees (不限制儿子个数的树)
查看>>
UVa 572 - Oil Deposits 搜索专题
查看>>
UVa 439 - Knight Moves 搜索专题
查看>>
UVa 657 - The die is cast 搜索专题
查看>>
UVa 784 - Maze Exploration 搜索专题
查看>>
UVa 705 - Slash Maze, 斜线迷宫
查看>>
UVa 196 - Spreadsheet
查看>>
UVa 10557 - XYZZY
查看>>
UVa 10004 - Bicoloring
查看>>
HDU 3938 Portal(离线+Kruskal+并查集)
查看>>
poj 1639 Picnic Planning(最小度限制生成树)
查看>>
CodeForces 236B - Easy Number Challenge(数论:求因子个数)
查看>>
HDU 2594 Simpsons’ Hidden Talents(KMP)
查看>>
HDU 3336 Count the string(经典,KMP+DP)
查看>>
HDU 4300 Clairewd’s message(拓展KMP)
查看>>
HDU 3374 String Problem(最小最大表示法+KMP)
查看>>