Informix 索引禁用期间数据变化,重启启用后索引的变化情况

Informix 可以提供索引禁用的功能,通过测试结果如下:

1、在禁用期间,dbschema查看表结构的时候,索引已经是disabled的状态,oncheck -pt看不到磁盘上的索引extent信息;

     set indexes idx_name disabled;

2、在索引禁用期间,继续插入新数据,然后再启用索引,可以观察到新插入数据对应的索引的extent已经生成。

    set indexes idx_name enabled;

 

 1、customer2表有uniq index,插入100W行数据;
 RESERVED PAGES                                                       0        2
 CHUNK FREELIST PAGE                                                  2        1
 tpcc100:'informix'.idx_omer2                                         3     9845
 tpcc100:'benchmarksql'.customer2                                  9848    65536
 tpcc100:'informix'.idx_omer2                                     75384     1408
 tpcc100:'benchmarksql'.customer2                                 76792    65536
 FREE                                                            142328   369672

2、set indexes idx_omer2 disabled;
 RESERVED PAGES                                                       0        2
 CHUNK FREELIST PAGE                                                  2        1
 FREE                                                                 3     9845
 tpcc100:'benchmarksql'.customer2                                  9848    65536
 FREE                                                             75384     1408
 tpcc100:'benchmarksql'.customer2                                 76792   196608
 FREE                                                            273400   238600

3、set indexes idx_omer2 enabled;
 RESERVED PAGES                                                       0        2
 CHUNK FREELIST PAGE                                                  2        1
 tpcc100:'informix'.idx_omer2                                         3     9845
 tpcc100:'benchmarksql'.customer2                                  9848    65536
 tpcc100:'informix'.idx_omer2                                     75384     1408
 tpcc100:'benchmarksql'.customer2                                 76792   196608
 tpcc100:'informix'.idx_omer2                                    273400     1408
 FREE                                                            274808   237192

4、drop index idx_omer2;
RESERVED PAGES                                                       0        2
 CHUNK FREELIST PAGE                                                  2        1
 FREE                                                                 3     9845
 tpcc100:'benchmarksql'.customer2                                  9848    65536
 FREE                                                             75384     1408
 tpcc100:'benchmarksql'.customer2                                 76792   196608
 FREE                                                            273400   238600

5、create unique index idx_omer2;
 RESERVED PAGES                                                       0        2
 CHUNK FREELIST PAGE                                                  2        1
 tpcc100:'informix'.idx_omer2                                         3     9845
 tpcc100:'benchmarksql'.customer2                                  9848    65536
 tpcc100:'informix'.idx_omer2                                     75384     1408
 tpcc100:'benchmarksql'.customer2                                 76792   196608
 tpcc100:'informix'.idx_omer2                                    273400     1408
 FREE                                                            274808   237192

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

请叫我曾阿牛

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值