Bit-Wise Indexing

Bitmap indexes use bit arrays (commonly called bitmaps) and answer queries by performing bitwise logical operations on these bitmaps.

Unlike other indexing methods, SAP Sybase IQ indexes are based on the cardinality of the data and the way the data will be used. SAP Sybase IQ has indexes for both low- and high-cardinality columns.

Bit-wise indexing benefits both low- and high-cardinality columns. It translates the distinct data elements of a column into a bit mask.

Cardinality is the number of unique values in a column:

Example of low-cardinality bit-wise indexing

The table on the left represents unindexed data. The table on the right represents the same data as a bit-wise index.
Note: These is not an actual index, but merely a representation of how bit-wise indexing works for low-cardinality data.


low-cardinality bit-wise indexing

Example of high-cardinality bit-wise indexing

The data is stored vertically.


high-cardinality bit-wise indexing