top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the difference between Bitmap and Btree index?

+1 vote
635 views
What is the difference between Bitmap and Btree index?
posted Jun 25, 2015 by Sunil

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Internally, a bitmap and a btree indexes are very different, but functionally they are identical in that they serve to assist Oracle in retrieving rows faster than a full-table scan.

The basic differences between b-tree and bitmap indexes include:

1: Syntax differences: The bitmap index includes the "bitmap" keyword. The btree index does not say "bitmap".

2: Cardinality differences: The bitmap index is generally for columns with lots of duplicate values (low cardinality), while b-tree indexes are best for high cardinality columns.

3: Internal structure differences: The internal structures are quite different. A b-tree index has index nodes (based on data block size), it a tree form:

or--

Btree

It is made of branch nodes and leaf nodes. Branch nodes holds prefix key value along with the link to the leaf node. The leaf node in turn contains the indexed value and rowed.

Bitmap

It simply consists of bits for every single distinct value. It uses a string of bits to quickly locate rows in a table. Used to index low cardinality columns.

answer Jun 26, 2015 by Manikandan J
...