|
最初由 超级野人 发布
[B]
其实我想指出的是,每一个row的header所占用的3个字节中,并不包括该row的lenth,而是column的数量。不行的话可以做个试验,建立一个表,(两列),然后每行插入300多个字节(每列100多个字节),可以发现,row的header的三个字节的长度并没有发生改变,如果是记录该行的长度的话,至少应该增加一个字节吧。可实际上去没有。所以说三个字节中有一个是包含column的数量的,只是另外两个字节是存储什么信息的,我还没想明白。 [/B]
看看ORACLE DOC的说明:
The row header precedes the data and contains information about:
Row pieces
Chaining (for chained row pieces only)
Columns in the row piece
Cluster keys (for clustered data only)
A row fully contained in one block has at least 3 bytes of row header. After the row header information, each row contains column length and data. The column length requires 1 byte for columns that store 250 bytes or less, or 3 bytes for columns that store more than 250 bytes, and precedes the column data. Space required for column data depends on the datatype. If the datatype of a column is variable length, then the space required to hold a value can grow and shrink with updates to the data.
嗯,看来row header 是至少3字节,然后记录column length的字节随着length变化。少于250用1字节,大于250用3字节。
所以,上面的例子的说明还是有出入,作了更正。 |
|