Index-Organized Tables with Row Overflow Area (230)

tsinglee發表於2007-11-20

B-tree index entries are usually quite small, because they only consist of the key value
and a ROWID. In index-organized tables, however, the B-tree index entries can be large,
because they consist of the entire row. This may destroy the dense clustering property
of the B-tree index.

Oracle provides the OVERFLOW clause to handle this problem. You can specify an
overflow tablespace so that, if necessary, a row can be divided into the following two
parts that are then stored in the index and in the overflow storage area segment,
respectively:
■ The index entry, containing column values for all the primary key columns, a
physical rowid that points to the overflow part of the row, and optionally a few of
the nonkey columns
■ The overflow part, containing column values for the remaining nonkey columns

With OVERFLOW, you can use two clauses, PCTTHRESHOLD and INCLUDING, to control
how Oracle determines whether a row should be stored in two parts and if so, at
which nonkey column to break the row. Using PCTTHRESHOLD, you can specify a
threshold value as a percentage of the block size. If all the nonkey column values can
be accommodated within the specified size limit, the row will not be broken into two
parts. Otherwise, starting with the first nonkey column that cannot be accommodated,
the rest of the nonkey columns are all stored in the row overflow segment for the table.

The INCLUDING clause lets you specify a column name so that any nonkey column,
appearing in the CREATE TABLE statement after that specified column, is stored in the
row overflow segment. Note that additional nonkey columns may sometimes need to
be stored in the overflow due to PCTTHRESHOLD-based limits.

索引組織表的行溢位區域
1. 使用者可以在需要時設定一個溢位表空間,將一個資料行分為兩部分,分別儲存在索引及行溢位段內。
一行資料可以被分為如下兩部分:
* 索引項 : 其中包含了主鍵列的全部列值,指向此行溢位部分資料的物理 rowid,以及使用者選定的非鍵列值
* 行溢位部分 : 包含了其餘非鍵列的列值
2. PCTTHRESHOLD : 資料塊容量的百分比值
INCLUDING : 設定一個列名,之後所有的非鍵列儲存在行溢位段中

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10599713/viewspace-983047/,如需轉載,請註明出處,否則將追究法律責任。

相關文章