Users can speed up queries by creating a bitmap index This document focuses on how to create an index job, as well as some considerations and frequently asked questions when creating an index.
- bitmap index: a fast data structure that speeds up queries
Creating and dropping index is essentially a schema change job. For details, please refer to Schema Change.
Create a bitmap index for siteid on table1
CREATE INDEX [IF NOT EXISTS] index_name ON table1 (siteid) USING BITMAP COMMENT 'balabala';
Display the lower index of the specified table_name
SHOW INDEX FROM example_db.table_name;
Delete the lower index of the specified table_name
DROP INDEX [IF EXISTS] index_name ON [db_name.]table_name;
- Currently only index of bitmap type is supported.
- The bitmap index is only created on a single column.
- Bitmap indexes can be applied to all columns of the
Uniqdata model and key columns of the
- The data types supported by bitmap indexes are as follows:
- The bitmap index takes effect only in segmentV2. The table's storage format will be converted to V2 automatically when creating index.
For more detailed syntax and best practices for using bitmap indexes, please refer to the CREARE INDEX / SHOW INDEX / DROP INDEX command manual. You can also enter HELP CREATE INDEX / HELP SHOW INDEX / HELP DROP INDEX on the MySql client command line.