ITPub博客

首页 > 数据库 > 数据库开发技术 > Index-Organized Tables with Row Overflow Area (230)

Index-Organized Tables with Row Overflow Area (230)

原创 数据库开发技术 作者:tsinglee 时间:2007-11-20 11:21:34 0 删除 编辑

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/,如需转载,请注明出处,否则将追究法律责任。

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