Format of Index Blocks (207)

本文介绍了Oracle数据库中索引的创建过程及存储方式。包括索引数据段可用空间的计算方法,创建索引时Oracle如何获取并排序要索引的列,并将rowid和索引值存储起来。

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

转载于:http://blog.itpub.net/10599713/viewspace-982563/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值