row header format (157)

tsinglee發表於2007-11-07

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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章