Creating a Bitmap Index

Once you have determined that bitmap indexes are appropriate for your environment, it is fairly straightforward to create a bitmap index. The syntax is the same as it is for a B-tree index, except that you need to include the keyword BITMAP when creating the index. For example,

CREATE BITMAP INDEX EMPLOYEES_B1 ON EMPLOYEES (GENDER) NOLOGGING;

Because the physical structure of a bitmap index is so simple, and therefore much smaller than a B-tree index, you can create them much faster than a B-tree index. Note that the NOLOGGING keyword is used in the previous example. We recommend you always create bitmap indexes with NOLOGGING because DML operations on bitmap indexes perform so poorly that it's a good idea to destroy ...

Get Expert Indexing in Oracle Database 11g: Maximum Performance for Your Database now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.