VeloDB Cloud
SQL Manual
Statments
Data-Definition-Statements
Alter
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.

Syntax:

ALTER TABLE [database.]table alter_clause;

The alter_clause of bitmap index supports the following modifications:

  1. Create a bitmap index

Syntax:

ADD INDEX [IF NOT EXISTS] index_name (column [, ...],) [USING BITMAP] [COMMENT 'balabala'];

Note:

  • Only bitmap index is supported currently
  • Bitmap index can only be created on a single column
  1. Delete the index

Syntax:

DROP INDEX [IF EXISTS] index_name;

Example

  1. Create bitmap index for siteid on table1
ALTER TABLE table1 ADD INDEX [IF NOT EXISTS] index_name (siteid) [USING BITMAP] COMMENT 'balabala';
  1. 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

Best Practice