Skip to content
Merged
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
16 changes: 16 additions & 0 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,22 @@ Constraint checking is always performed in place for pessimistic transactions (d
- Default value: 0
- This variable is used to control whether to enable the cascades planner, which is currently considered experimental.

### tidb_enable_clustered_index <!-- New in v5.0 -->

- Scope: SESSION | GLOBAL
- Default value: 1
- This variable is used to control whether to enable the clustered index feature.
- This feature is only applicable to newly created tables and does not affect the existing old tables.
- This feature is only applicable to tables whose primary key is the single-column non-integer type or the multi-column type. It does not affect the tables without a primary key or tables with the primary key of the single-column non-integer type.
- You can execute `select tidb_pk_type from information_schema.tables where table_name ='{table_name}'` to check whether the clustered index feature has been enabled on a table.
- After you enable this feature, rows are stored directly on the primary key instead of on the internally allocated `rows_id` to which the extra primary key index is created to point.

This feature impacts performance in the following aspects:
- For each `INSERT` operation, there is one less index key written into each row.
- When you make a query using the primary key as the equivalent condition, one read request can be saved.
- When you make a query using the primary key as the range condition, multiple read requests can be saved.
- When you make a query using the prefix of the multi-column primary key as the equivalent condition or range condition, multiple read requests can be saved.

### tidb_enable_chunk_rpc <span class="version-mark">New in v4.0</span>

- Scope: SESSION
Expand Down