ALTER-TABLE-BITMAP
ALTER-TABLE-BITMAPβ
Nameβ
ALTER TABLE BITMAP
Descriptionβ
This statement is used to perform a bitmap index operation on an existing table.
grammar:
ALTER TABLE [database.]table alter_clause;
The alter_clause of bitmap index supports the following modification methods
- Create a bitmap index
Syntax:
ADD INDEX [IF NOT EXISTS] index_name (column [, ...],) [USING BITMAP] [COMMENT 'balabala'];
Notice:
- Currently only supports bitmap indexes
- BITMAP indexes are only created on a single column
- Delete the index
Syntax:
DROP INDEX [IF EXISTS] index_name;
Exampleβ
- Create a bitmap index for siteid on table1
ALTER TABLE table1 ADD INDEX [IF NOT EXISTS] index_name (siteid) [USING BITMAP] COMMENT 'balabala';
- Delete the bitmap index of the siteid column on table1
ALTER TABLE table1 DROP INDEX [IF EXISTS] index_name;
Keywordsβ
ALTER, TABLE, BITMAP, INDEX, ALTER TABLE