Bitmap Index
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.
Glossary
- bitmap index: a fast data structure that speeds up queries
Basic Principles
Creating and dropping index is essentially a schema change job. For details, please refer to Schema Change.
Syntax
There are two forms of index creation and modification related syntax, one is integrated with alter table statement, and the other is using separate create/drop index syntax
- Create Index
Please refer to CREATE INDEX or ALTER TABLE, You can also specify a bitmap index when creating a table, Please refer to CREATE TABLE 2. Show Index
Please refer to SHOW INDEX 3. Drop Index
Please refer to DROP INDEX or ALTER TABLE
Create Job
Please refer to Schema Change
View Job
Please refer to Schema Change
Cancel Job
Please refer to Schema Change
Notice
- 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
Duplicatedata model and key columns of theAggregateandUniqmodels. - The data types supported by bitmap indexes are as follows:
TINYINTSMALLINTINTUNSIGNEDINTBIGINTCHARVARCHARDATEDATETIMELARGEINTDECIMALBOOL- The bitmap index takes effect only in segmentV2. The table’s storage format will be converted to V2 automatically when creating index.
