Files
doris/new-docs/en/sql-manual/sql-reference-v2/Data-Definition-Statements/Create/CREATE-INDEX.md
smallhibiscus df021dc7eb Modify create and drop docs in DDL module. (#9030)
Modify create and drop docs in DDL module.
2022-04-15 16:32:48 +08:00

1.4 KiB

title, language
title language
CREATE-INDEX en

CREATE-INDEX

Name

CREATE INDEX

Description

This statement is used to create an index grammar:

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

Notice:

  • Currently only supports bitmap indexes
  • BITMAP indexes are only created on a single column

Example

  1. Create a bitmap index for siteid on table1

    CREATE INDEX [IF NOT EXISTS] index_name ON table1 (siteid) USING BITMAP COMMENT 'balabala';
    

Keywords

CREATE, INDEX

Best Practice