B-tree and Bitmap Index

本文详细介绍了Oracle数据库中两种类型的索引:B树索引和位图索引。B树索引是最常用的索引类型,其结构包括根节点、分支节点和叶节点;位图索引适用于某些特殊场景,其结构同样包含根节点、分支节点和叶节点,但叶节点是由位图构成。
Oracle has 2 kinds of Index: B-tree index and Bitmap Index.
B-tree index is commonly used index, which is created using CREATE INDEX command.

B-tree index structure:
  • Root: Pointer to branch node
  • Branch: Pointer to Leaf node. The distinct value of index columns are sorted and divided into different groups. Each branch is mapped to a group of data.
  • Leaf: Each Leaf contains the rowid of the records it refers to. Leaf node are linked together in both directions, allowing ascending or descending search. Also leaf nodes can be sorted by ascending or descending.
Bitmap index is some special index, which is created using CREATE BITMAP INDEX command.
Bitmap Index structure:
Root: Pointer to branch node
Branch: Pointer to Leaf node. Branch contains the start rowid and end rowid of the leaf blocks it refers to. (It is different from B-tree here. Here is start rowid and end rowid.)
Leaf: Leaf is a bitmap. Each bit in the bitmap corresponds to a row in the table. You can think the bitmap like a table with RowID as Row Header and Values as column header. When the row has the value of the column header. It is marked to 1, else 0.

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

转载于:http://blog.itpub.net/563971/viewspace-324393/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值