问题分析:
查看表空间的snapshot,发现这个表空间的映射有点奇怪(这个是rebalance完成后的),container大小都是一样,为什么映射是这样的?
Range Stripe Stripe Max Max Start End Adj. Containers
Number Set Offset Extent Page Stripe Stripe
[ 0] [ 0] 0 163835 5242751 0 40958 0 4 (0,1,2,3)
[ 1] [ 0] 0 237563 7602047 40959 49150 0 9 (0,1,2,3,4,5,6,7,8)
[ 2] [ 0] 0 401398 12844767 49151 81917 0 5 (4,5,6,7,8)
[ 3] [ 0] 0 499702 15990495 81918 90109 0 12 (4,5,6,7,8,9,10,11,12,13,14,15)
[ 4] [ 0] 0 600054 19201759 90110 104445 0 7 (9,10,11,12,13,14,15)
[ 5] [ 0] 0 1212383 38796287 104446 131068 0 23 (9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31)
[ 6] [ 0] 0 1572831 50330623 131069 153596 0 16 (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31)
实验测试:
===测试1:增加数据库文件,新增数据文件大于原有的数据文件===
最初表空间分布
db2 get snapshot for tablespaces on sampledb >> ts1.out
Table space map:
Range Stripe Stripe Max Max Start End Adj. Containers
Number Set Offset Extent Page Stripe Stripe
[ 0] [ 0] 0 77 2495 0 38 0 2 (0,1)
执行
db2 "alter tablespace USERSP4 add (file '/db2data/db2inst1/sampledb/data/usersp4_c03' 20M, file '/db2data/db2inst1/sampledb/data/usersp4_c04' 20M)"
查看表空间分布
db2 get snapshot for tablespaces on sampledb >> ts2.out
Table space map:
Range Stripe Stripe Max Max Start End Adj. Containers
Number Set Offset Extent Page Stripe Stripe
[ 0] [ 0] 0 155 4991 0 38 0 4 (0,1,2,3)
[ 1] [ 0] 0 235 7551 39 78 0 2 (2,3)
执行
db2 "alter tablespace USERSP4 resize (all 20M)"
查看表空间分布
db2 get snapshot for tablespaces on sampledb >> ts3.out
Table space map:
Range Stripe Stripe Max Max Start End Adj. Containers
Number Set Offset Extent Page Stripe Stripe
[ 0] [ 0] 0 315 10111 0 78 0 4 (0,1,2,3)
自动降表空间分布规整了。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。