• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

Oracle Database 中 B*Tree 索引内部维护

mysql 搞代码 4年前 (2022-01-09) 22次浏览 已收录 0个评论

当一个btree 索引使用create index语句创建的时候,可以设置pctfree 参数。pctfree指定index block中为了未来更新或者新增索引数

最近一周在复习索引相关的东西,,除了回顾concept,还在MOS上看到了一篇比较好的文档。分享给大家。

文档编号:[ID 30405.1]

This article is only concerned with B*tree indexes which are currently the most commonly used. The theory of B*tree indexes is beyond the scope of this article; for more information refer to computer science texts dealing with data structures.

这篇文档只描述关于当前最常用的b*tree索引。b*tree索引的原理已经超过了本文档的范围。更多的信息可以去查看计算机的数据结构原理。

Format of Index Blocks
~~~~~~~~~~~~~~~~~~~~~~

索引的结构(格式?)

Within a B*tree index, index blocks are either branch blocks, the upper blocks within the B*tree index, or leaf blocks, the lowest level index blocks. Branch blocks contain index data that point to lower level index blocks. Leaf blocks contain every indexed data value and a corresponding ROWID used to locate the actual row.

在b*tree索引中,一共有两种索引块,一种是branch block(分支块),还有leaf block(叶块),一种是高level,一种低level的(低level,在索引底部)。branch block包含定位低等级的索引块(可能是branch block或者leaf block)的pointer leaf block包含每一个索引数据值和相应的rowid(用来定位真正的row)。

以下是一个索引块的分布情况:

Index Block Format

|—————————————————–|
| |
| Index Block Header |
| |
——————————————————|
| |
| Space reserved for future updates |
| and inserts of new rows with the |
| appropriate key values |
| |
|—————————————————–| <- PCTFREE say 10
| |
| Index Key Data |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|—————————————————-

本文来源gao!daima.com搞$代!码网

-|

B*tree Index Creation


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:Oracle Database 中 B*Tree 索引内部维护

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址