Prev | Current Page 856 | Next

Richard Niemiec

"Oracle Database 10g Performance Tuning Tips & Techniques"


Using Bitmap Indexes
An alternative to B-tree indexes, called bitmap indexes, provides query optimization benefits in
environments that frequently perform joins on columns with low cardinality. In this section, we??™ll
review the basics of bitmap indexes, create a bitmap index, and show how bitmap indexes can be
created ahead of time against columns in two or more tables.
Understanding Bitmap Indexes
A bitmap index is extremely useful in a VLDB environment when the column being indexed has
a very low number of possible values, such as gender, where the possible values are usually ???M??™
and ???F??™. A bitmap index uses a string of binary ones and zeros to represent the existence or
nonexistence of a particular column value. Using bitmap indexes makes multiple AND and OR
operations against several table columns very efficient in a query. Bitmap indexes are common in
data warehouse and other VLDB environments where many low-cardinality columns exist, DML
commands are done in bulk, and the query conditions frequently use columns with bitmap indexes.
The space requirements for a bitmap index are low as long as the cardinality is low; for example,
a bitmap index on the GENDER column of the EMPLOYEES table would contain two bitmaps
with a length equal to the number of rows in the table. If the EMPLOYEES table had 15 rows, the
bitmaps for the GENDER column might look like the following:
GENDER_BM_IX:
F: 1 1 0 1 1 1 0 0 0 1 0 1 1 1 0
M: 0 0 1 0 0 0 1 1 1 0 1 0 0 0 1
590 Oracle Database 11g DBA Handbook
As you can see, the size of the bitmap index is directly proportional to the cardinality of the
column being indexed.


Pages:
844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868
perfumy fm Anteny satelitarne apartamenty przy plaży online loan for bad credit rekuperatory