Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions sql-statements/sql-statement-create-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,18 @@ Query OK, 0 rows affected (0.31 sec)

## Expression index

> **Note:**
>
> Expression index is still an experimental feature. It is **NOT** recommended that you use it in the production environment.

To use this feature, make the following setting in [TiDB Configuration File](/tidb-configuration-file.md#allow-expression-index-new-in-v400):

{{< copyable "sql" >}}

```sql
allow-expression-index = true
```

TiDB can build indexes not only on one or more columns in a table, but also on an expression. When queries involve expressions, expression indexes can speed up those queries.

Take the following query as an example:
Expand Down
7 changes: 6 additions & 1 deletion tidb-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -612,4 +612,9 @@ For pessimistic transaction usage, refer to [TiDB Pessimistic Transaction Mode](

## experimental

The `experimental` section, introduced in v3.1.0, describes configurations related to the experimental features of TiDB. Currently, this section has no configuration item.
The `experimental` section, introduced in v3.1.0, describes configurations related to the experimental features of TiDB.

### `allow-expression-index` <span class="version-mark">New in v4.0.0</span>

- Determines whether to create the expression index.
- Default value: false