- UID
- 48934
- 阅读权限
- 100
- 帖子
- 2022
- 精华贴数
- 10
- 技术排名
- 155
- 技术积分
- 11953
- 社区排名
- 2606
- 社区积分
- 370
- 注册时间
- 2003-6-13
- 精华贴数
- 10
- 技术积分
- 11953
- 社区积分
- 370
- 注册时间
- 2003-6-13
- 论坛徽章:
- 16
|
发表于 2004-7-27 13:35:05
|显示全部楼层
3)Data Area
包括14bytes的data header,4bytes/table的table dictionary,2bytes/row的row dictionary,即每增加一条row,row dictionary就多出2bytes用来记载该row,可以通过下面的hsiz反映出来。table dictionary主要用于cluster block中,只不过table block中的table dictionary只有一个table。
data_block_dump,data header at 0x552105c
===============
tsiz: 0x1fa0 [B]==> total data area size[/B]
hsiz: 0x14 [B]==> data header size (14+ntabs*4 + nrows*2)[/B]
pbl: 0x0552105c [B]==> pointer to buffer holding the block[/B]
bdba: 0x00c0007a [B]==> block dba / rdba[/B]
76543210
flag=-------- [B]==> n=pctfree hit (clusters),f=don't put on freelist, k=flushable cluster keys[/B]
ntab=1 [B]==> number of tables (>1 so this is a cluster)[/B]
nrow=1 [B]==> number of rows[/B]
frre=-1
fsbo=0x14 [B]==> free space begin offset[/B]
fseo=0x1f9b [B]==> free space end offset[/B]
avsp=0x1f83 [B]==> available space in the block[/B]
tosp=0x1f83 [B]==> total available space when all transactions commit[/B]
0xe ti[0] nrow=1 offs=0
0x12 ri[0] offs=0x1f9b
block_row_dump:
tab 0, row 0, @0x1f9b [B]==> 3bytes row header [/B]
tl: 5 fb: --H-FL-- lb: 0x1 cc: 1 [B]==> lb: 0x1 表示transaction 0x1,cc 表示column的个数[/B]
col 0: [ 1] 61 [B]==> column length(1 byte if length<250; otherwise 3 bytes) and values[/B]
end_of_block_dump
其中(摘自biti_rainy的关于block中数据的存储和重组的探究):
fb Flag Byte:
K = Cluster Key (Flags may change meaning if this is set to show HASH cluster)
C = Cluster table member
H = Head piece of row
D = Deleted row
F = First data piece
L = Last data piece
P = First column continues from previous piece
N = Last column continues in next piece |
|