Chinaunix首页 | 论坛 | 博客
  • 博客访问: 167745
  • 博文数量: 38
  • 博客积分: 2431
  • 博客等级: 少校
  • 技术积分: 470
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-20 09:49
文章分类

全部博文(38)

文章存档

2011年(2)

2010年(14)

2009年(10)

2008年(12)

我的朋友

分类: DB2/Informix

2008-09-10 17:25:36

1.通过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数..   
    Current serial value           1         

2.转换物理地址为 16 进制数.
在这里使用数据库自带的hex来转换..

<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.

3.通过onchek -pP 来获取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  

4.则现在可以计算 还可增加的extent的数,最大区段数.
可增加区段数=trunc ( frcnt / 8 )= trunc (1748 / 8 )= 218
最大区段数 = 可增加区段数 + 已有区段数 = 218 + 15 = 233


注:参考informix性能指南.
阅读(1491) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2009-12-08 18:30:06

你这个版本直接执行就行了 oncheck -pP 5 30