Wednesday, October 22, 2008

Bitmap Index

Bitmap indexes are the most suitable for columns having very few unique values (very low cardinality). Ideally to choose the bitmap indexes as the right choice for a column the cardinality should be less than or equal to 0.05%.

Table should have no insert, update , delete or very few dml statements can act as good choice for bitmap indexes.

Bitmap indexes are highly compressed and usually take very less space when compared to B-tree indexes and are extensively used in data warehouses.

Advantage of Bitmap Indexes
Due to the nature of highly compressed structure of an bitmap index, Data can be accessed much faster than traditional B-tree indexes.

Bitmap index represent a good trade-off between disk usage and Cpu cost. A bitmap index requires more cpu cycles to decompress but requires less amount of work from disk I/O.

Disadvantages of Bitmap Indexes
Bitmap Indexes are traditionally meant to be developed for data warehouses. A modification to a bitmap index requires more work than a modification to b-tree indexes.

Deadlock’s On bitmap indexes
Bitmap indexes are not suitable for large concurrent single row Dml operations.

If there are 3 or more sessions simultaneously working to insert into a table which is bitmap indexed a dead lock situation can occur.

No comments: