In spite of the advantages they offer, bitmapped indexes are not applicable to every query. They are most useful when the following conditions are true:
- Index columns have few distinct values (less than 20)
- The SQL has several predicates involving bitmap indexes in the WHERE clause
- The SQL select statement is INDEX ONLY, meaning that reading the index without reading the table will satisfy the query.
In summary, bitmap indexes provide excellent performance, while using less storage. Because of their different performance characteristics, you should create bitmap indexes on low cardinality data, and keep B*tree indexes on high-cardinality data.
The next lesson discusses STAR index queries.