- 論壇徽章:
- 11
|
1.通過(guò)oncheck -pt 獲取的物理地址.
- <99 [informix] :/opt/informix>oncheck -pt dbmon:alerts
- TBLspace Report for dbmon:informix.alerts
- Physical Address 5:30 --所需的物理地址.
- Creation date 08/01/2008 15:27:54
- TBLspace Flags 802 Row Locking
- TBLspace use 4 bit bit-maps
- Maximum row size 140
- Number of special columns 0
- Number of keys 0
- Number of extents 15 --已有的extents數(shù)..
- Current serial value 1
復(fù)制代碼
2.轉(zhuǎn)換物理地址為 16 進(jìn)制數(shù).
在這里使用數(shù)據(jù)庫(kù)自帶的hex來(lái)轉(zhuǎn)換..
- <100 [informix] :/opt/informix>dbaccess sysmaster -
- Database selected.
- > select hex(5),hex(30) from systables where tabid="1";
- (constant) (constant)
- 0x00000005 0x0000001E
- 1 row(s) retrieved.
復(fù)制代碼
3.通過(guò)onchek -pP 來(lái)獲取frcnt. (此操作須用informix操作.)
- <101 [informix] :/opt/informix>oncheck -pP 0x00000005 0x0000001E
- addr stamp chksum nslots flag type frptr frcnt next prev
- 5:30 821864040 968f 5 2 PARTN 276 1748 0 0
- slot ptr len flg
- 1 24 92 0
- 2 116 32 0
- 3 148 0 0
- 4 148 0 0
- 5 148 128 0
復(fù)制代碼
4.則現(xiàn)在可以計(jì)算 還可增加的extent的數(shù),最大區(qū)段數(shù).
可增加區(qū)段數(shù)=trunc ( frcnt / 8 )= trunc (1748 / 8 )= 218
最大區(qū)段數(shù) = 可增加區(qū)段數(shù) + 已有區(qū)段數(shù) = 218 + 15 = 233
注:參考informix性能指南.
[ 本帖最后由 liaosnet 于 2008-9-10 17:22 編輯 ] |
|