持续更新关于ORACLE X$视图汇总

以后看到一个记录一个,不然老是忘记。

1、X$KSMSP

名称含义为:
[K]ernal [S]torage [M]emory Management [S]GA Hea[P],其中每一行都代表着shared pool中的一个chunk

KSMCHCOM是注释字段,每个内存块被分配以后,注释会添加在该字段中.
x$ksmsp.ksmchsiz代表块大小

x$ksmsp.ksmchcls列代表类型,主要有四类,说明如下:

free
Free chunks--不包含任何对象的chunk,可以不受限制的被分配.

recr
Recreatable chunks--包含可以被临时移出内存的对象,在需要的时候,这个对象可以
被重新创建.例如,许多存储共享sql代码的内存都是可以重建的.

freeabl
Freeable chunks--包含session周期或调用的对象,随后可以被释放.这部分内存有时候
可以全部或部分提前释放.但是注意,由于某些对象是中间过程产生的,这些对象不能
临时被移出内存(因为不可重建).

perm
Permanent memory chunks--包含永久对象.通常不能独立释放.

我们可以通过查询x$ksmsp视图来考察shared pool中存在的内存片的数量

2、x$bh

这个代表是BUFFER CACHE 中每一个块的信息。

字段信息如下:

The meaning of state:
0FREEno valid block image
1XCURa current mode block, exclusive to this instance
2SCURa current mode block, shared with other instances
3CR a consistent read (stale) block image
4READbuffer is reserved for a block being read from disk
5MRECa block in media recovery mode
6IRECa block in instance (crash) recovery mode
tch: tch is the touch count. A high touch count indicates that the buffer is used often. Therefore, it will probably be at the head of the MRU list. See also touch count.
tim: touch time.
class represents a value designated for the use of the block.
lru_flag
set_ds maps to addr on x$kcbwds.
le_addr can be outer joined on x$le.le_addr.
flag is a bit array.

Bitif set 
0Block is dirty 
4temporary block 
9 or 10ping 
14stale 
16direct 
524288 (=0x80000)Block was read in a full table scanSee this link

OBJ:应该就是OBJECT_ID。

x$kglpn
[K]ernel [G]eneric [L]ibrary [P]i[N]

dba_kgllock的基表

2.x$kglpn——[K]ernel [G]eneric [L]ibrary Cache Manager object [P]i[N]s

sys @ ORALOCAL ( 192.168.0.22 ) > desc x $ kglpn
##主要用来处理library cache pin holder
 
 
Name                                                   Null ?    Type
 ---------------------------------------------------
-- -------- ------------
 
ADDR                                                             RAW ( 4 )
 
INDX                                                             NUMBER
 
INST_ID                                                         NUMBER
 
KGLPNADR                                                         RAW ( 4 )
 
KGLPNUSE                                                         RAW ( 4 )
 
KGLPNSES                                                         RAW ( 4 )
 
KGLPNHDL                                                         RAW ( 4 )
##关联v$session_wait中event为library cache pin的P1RAW,再关联v$session,可以查出sid和serial#
 
 
KGLPNLCK                                                         RAW ( 4 )
 
KGLPNCNT                                                         NUMBER
 
KGLPNMOD                                                         NUMBER
##如果值为3,表示为library cache pin的holder;如果值为0,表示为waiter
 
 
KGLPNREQ                                                         NUMBER
##如果值为0,表示为library cache pin的holder;如果值为2,表示为waiter
 
 
KGLPNDMK                                                         NUMBER
 
KGLPNSPN                                                         NUMBER

x$kglob
[K]ernel [G]eneric [L]ibrary cache [OB]ject

x$kglob.kglhdadr = v$session_wait.p1raw

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7728585/viewspace-676956/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/7728585/viewspace-676956/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值