12
返回列表 发新帖
楼主: stuff990

关于free space管理的困惑

[复制链接]
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
11#
发表于 2009-2-18 04:14 | 只看该作者
dancle, thanks for your excellent test. I tried to reproduce the autoallocate case in Oracle 10.2.0.4. To me, the bits in the bitmap seem to represent extents (each bit for one extent). I create a table in an autoallocate ASSM tablespace with one datafile as you do. Then alter table allocate extent. I dump block 3 of the datafile every time I alter table allocate extent and so the dumps are all in the same trace file. Here's the trace:

$ perl -nle 'print $_=<> if /^RelFno/' ristss1t_ora_21197.trc | grep -v '^$'
0300000000000000 0000000000000000 0000000000000000 0000000000000000
0700000000000000 0000000000000000 0000000000000000 0000000000000000
0F00000000000000 0000000000000000 0000000000000000 0000000000000000
1F00000000000000 0000000000000000 0000000000000000 0000000000000000

You see the numbers, which are in binary 11, 111, 1111, 11111, respectively.

The only difference between my test and yours is that you didn't do "allocate extent" as you did in the uniform extent size case.

So I did another test, exactly like yours. I can't get to have 0700000000000000 shown in trace file. After I ran the insert select from dba_users (we have 384 users) multiple times, I can get 0300000000000000. By this time, I have two extents in dba_extents. So the bits match the number of extents.

Yong Huang

[ 本帖最后由 Yong Huang 于 2009-2-18 14:45 编辑 ]

使用道具 举报

回复
论坛徽章:
4
授权会员
日期:2005-10-30 17:05:33ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44祖国60周年纪念徽章
日期:2009-10-09 08:28:002010新春纪念徽章
日期:2010-03-01 11:06:12
12#
发表于 2009-9-13 12:49 | 只看该作者
我也做了个测试

drop tablespace tt_tbs including contents and datafiles;

create tablespace tt_tbs
datafile 'c:\temp\tt_tbs01.DBF' size 10m
extent management local
segment space management auto;

create table tt (id number,name varchar2(80)) tablespace tt_tbs;

insert into tt select object_id,object_name from dba_objects;

commit;

alter system dump datafile 13 block 3;

trace file:
File Space Bitmap Block:
BitMap Control:
RelFno: 13, BeginBlock: 9, Flag: 0, First: 48, Free: 63440
FFFFFFFFFFFF0000 0000000000000000 0000000000000000 0000000000000000

====================================
select extent_id, blocks from dba_extents where segment_name like  'TT' order by file_id, block_id
------------------------------------------------------------

0        8
1        8
2        8
3        8
4        8
5        8
6        8
7        8
8        8
9        8
10        8
11        8
12        8
13        8
14        8
15        8
16        128
17        128

(128+128+16*8)/8 = 48

从以上看, 一个bit代表8 blocks.

谢谢

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表