Problem solve Get help with specific problems with your technologies, process and projects.

Help with bitmaps and b-tree indexes

How is the b-tree index stored internally? Also, if a query is submitted, how is the query result loaded in memory? Is it block-oriented or column-oriented?

  1. How is the b-tree index stored internally?
  2. If a query is submitted, how is the query result loaded in memory? Is it block-oriented or column-oriented?
Bitmaps are stored compressed with one row/column value in the array. A bitmap for a 1,000-row table on a 50-valued index would have 50,000 bit entries. The bitmaps are block-oriented storage-wise, and they are uncompressed at runtime. Also, updates are very, very slow compared to b-tree indexes.

Oracle also has bitmap join indexes:


In general, you will want a bitmap index when:

  1. Table column is low cardinality -- As a rough guide, consider a bitmap for any index with less than 100 distinct values.
        select region, count(*) from sales group by region; 
  2. The table has low DML -- You must have low insert./update/delete activity. Updating bitmapped indexes takes a lot of resources, and bitmapped indexes are best for largely read-only tables and tables that are batch updated nightly.
  3. Multiple columns -- Your SQL queries reference multiple, low-cardinality values in their where clause. Oracle cost-based SQL optimizer (CBO) will scream when you have bitmap indexes on.
This was last published in November 2005

Dig Deeper on Oracle database design and architecture



Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.