首页 > 数据库 > Oracle > 2015.10.27 shared pool
SQL> select * from (select * from v$sgastat where pool='shared pool' order by 3 desc) where rownum<11;
POOL NAME BYTES
------------------------ ---------------------------------------------------- ----------
shared pool free memory 7610472
shared pool ASH buffers 5872028
shared pool XDB Schema Cac 4289116
shared pool KCB Table Scan Buffer 3981204
shared pool KSFD SGA I/O b 3977128
shared pool row cache 3741868
shared pool library cache 2847924
shared pool sql area 2672320
shared pool kglsim hash table bkts 2097152
shared pool event statistics per sess 1555840
permanent area:process,session,segment array(enqueue,transaction..)等,进程列表,
回话列表,enqueue列表,事物列表等的资源分配到共享池的永久区域,与
instance的寿命相同
library cache :管理执行sql语句必要的全部对象(sql,table,view,procedure)信息
row cache :dictionary cache,管理oracle所使用的dictionary信息
reserved area :保留区域,为动态分配内存,oracle将分配部分保留区域
1)heap将多个extent以linked list形式连接,一个区物理上使用一个granule,
granule是oracle9i以上版本使用的联系物理内存块的单位,若SGA大小小于1G,则是4M,
若大于1G,则是16M。一个区由多个chunk组成,而各chunk的使用情况可以通过x$ksmsp view,procedure
查看。
2)chunk状态分为 free(可马上使用),recr(recreatable:可再生),freeabl(freeable:
只有在session或call期间内保存必要的对象状态),perm(permanent:永久,不可再生)。
其中free,recr状态下的chunk可以充分使用
3)chunk拥有管理空闲列的bucket表
4)heap拥有LRU列,LRU列是unpinned recreatedchunk,就是当前未使用而且可以重建的chunk的列。
SQL> alter session set events 'immediate trace name heapdump level 2';
会话已更改。
9i以上版本,shared pool可以分为多个副池(最多7个)进行管理
SQL> @?/yccs
输入 value 的值: _kghdsidx_count
原值 4: AND ksppinm like '%&value%'
新值 4: AND ksppinm like '%_kghdsidx_count%'
KSPPINM KSPPSTVL KSPPDESC
--------------------------------------------- ---------- ------------------------------
_kghdsidx_count 1 max kghdsidx count
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24237320/viewspace-1825199/ ,如需转载,请注明出处,否则将追究法律责任。