Skip to content

Commit

Permalink
[Doc]fix issues related to bitmap index (StarRocks#13594)
Browse files Browse the repository at this point in the history
  • Loading branch information
femiiii authored Nov 18, 2022
1 parent 2da64bf commit 6e0b558
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,7 @@ Syntax:
INDEX index_name (col_name[, col_name, ...]) [USING BITMAP] COMMENT 'xxxxxx'
```

Note:

index_name: Index name

col_name: Column name

> Note:
> Currently only BITMAP index is supported and it only applies to single columns.
You can only create bitmap indexes when you create tables. For more information about parameter descriptions and usage notes, see [Bitmap indexing](../../../using_starrocks/Bitmap_index.md#create-a-bitmap-index).

### ENGINE type

Expand Down
8 changes: 4 additions & 4 deletions docs/using_starrocks/Bitmap_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ There are two ways to create a bitmap index for a column.
k2 DECIMAL(10, 2) DEFAULT "10.5",
v1 CHAR(10) REPLACE,
v2 INT SUM,
INDEX index_name (column_name [, ...]) USING BITMAP COMMENT ''
INDEX index_name (column_name [, ...]) [USING BITMAP] [COMMENT '']
)
ENGINE = olap
AGGREGATE KEY(k1, k2)
Expand All @@ -46,11 +46,11 @@ There are two ways to create a bitmap index for a column.

| **Parameter** | **Required** | **Description** |
| ------------- | ------------ | ------------------------------------------------------------ |
| index_name | Yes | The name of the bitmap index. |
| column_name | Yes | The name of the column on which a bitmap index is created. You can create the index for multiple columns at a time by specifying these column names. |
| index_name | Yes | The name of the bitmap index. The naming conventions are as follows:<ul><li>The name can contain letters, digits (0-9), and underscores (_). It must start with a letter.</li><li>The name cannot exceed 64 characters in length.</li></ul>The name of bitmap index must be unique in a table. |
| column_name | Yes | The name of the column on which a bitmap index is created. You can only create one bitmap index for a columns. |
| COMMENT | No | The comment of the bitmap index. |

For other parameter descriptions of the CREATE TABLE statement, see [CREATE TABLE](../sql-reference/sql-statements/data-definition/CREATE%20TABLE.md).
You can create bitmap indexes for multiple columns at a time by specifying multiple `INDEX index_name (column_name [, ...]) [USING BITMAP] [COMMENT '']` commands. These commands need to be separated with commas (,). For other parameter descriptions of the CREATE TABLE statement, see [CREATE TABLE](../sql-reference/sql-statements/data-definition/CREATE%20TABLE.md).

- Create a bitmap index for a column of a table using the CREATE INDEX statement. For parameter descriptions and examples, see [CREATE INDEX](../sql-reference/sql-statements/data-definition/CREATE%20INDEX.md).

Expand Down

0 comments on commit 6e0b558

Please sign in to comment.