ITPub博客

首页 > 数据库 > 数据库开发技术 > Format of Index Blocks (207)

Format of Index Blocks (207)

原创 数据库开发技术 作者:tsinglee 时间:2007-11-16 10:01:36 0 删除 编辑

Space available for index data is the Oracle block size minus block overhead, entry
overhead, rowid, and one length byte for each value indexed.

When you create an index, Oracle fetches and sorts the columns to be indexed and
stores the rowid along with the index value for each row. Then Oracle loads the index
from the bottom up. For example, consider the statement:
CREATE INDEX employees_last_name ON employees(last_name);

Oracle sorts the employees table on the last_name column. It then loads the index
with the last_name and corresponding rowid values in this sorted order. When it
uses the index, Oracle does a quick search through the sorted last_name values and
then uses the associated rowid values to locate the rows having the sought last_
name value.

索引格式
1. 索引数据段可用空间由数据块大小减去块开销 , 条目开销 ,rowid , 索引长度值(1位)
2. 创建索引的时候 ,Oracle取得并排序要创建索引的列 ,
将rowid和索引值存储起来按从下到上的顺序加载到索引中

[@more@]

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

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