Bitmap indexing stores the combination of indexed column value and list of rows as a bitmap. Bitmap indexing is commonly used for columns with distinct values. Let's review a few examples: Base table, Table_XXCol_1 Integer, XCol_2 string, XCol_3 integer, and XCol_4 string. Create an index:
CREATE INDEX table_x_idx_1 ON TABLE table_x (xcol_1) AS 'COMPACT'; SHOW INDEX ON table_x_idx; DROP INDEX table_x_idx ON table_x; CREATE INDEX table_x_idx_2 ON TABLE table_x (xcol_1) AS 'COMPACT' WITH DEFERRED REBUILD; ALTER INDEX table_x_idx_2 ON table_x REBUILD; SHOW FORMATTED INDEX ON table_x;
The preceding index is empty because it is created with the DEFERRED REBUILD clause, regardless of whether or not the table contains any data. After ...