ITPub博客

首页 > 应用开发 > IT综合 > row header format (157)

row header format (157)

原创 IT综合 作者:tsinglee 时间:2007-11-07 11:40:40 0 删除 编辑

Each row piece, chained or unchained, contains a row header and data for all or some
of the row’s columns. Individual columns can also span row pieces and, consequently,
data blocks.
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.
To conserve space, a null in a column only stores the column length (zero). Oracle does
not store data for the null column. Also, for trailing null columns, Oracle does not even
store the column length.
Clustered rows contain the same information as nonclustered rows. In addition, they
contain information that references the cluster key to which they belong.

行头格式
1. 行头位于行数据之前,包含以下信息:
a. 行管理开销
b. 行片断链接的ROWID(如果有链接)
c. 列数
d. 簇键ID(如果是簇表)
2. 如果一行能被存储于一个数据块中,那么其行头所需容量将不少于 3 字节.
在行头信息之后储存的是各列的列长及列值. 列长存储于列值之前,如列值不超过 250 字节,
那么 Oracle 使用 1 字节存储其列长;如列值超过 250 字节,则使用 3 字节存储其列长.

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10599713/viewspace-981074/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    740
  • 访问量
    1892751