Skip to content

Commit

Permalink
clustered-indexes.md: change the system variable default value to ON (
Browse files Browse the repository at this point in the history
  • Loading branch information
tangenta authored Sep 6, 2022
1 parent 5d3a4c4 commit 5159b0d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion clustered-indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ CREATE TABLE t (a BIGINT, b VARCHAR(255), PRIMARY KEY(a, b) /*T![clustered_index
- `ON` 表示所有主键默认使用聚簇索引。
- `INT_ONLY` 此时的行为受配置项 `alter-primary-key` 控制。如果该配置项取值为 `true`,则所有主键默认使用非聚簇索引;如果该配置项取值为 `false`,则由单个整数类型的列构成的主键默认使用聚簇索引,其他类型的主键默认使用非聚簇索引。

系统变量 `@@global.tidb_enable_clustered_index` 本身的默认值为 `INT_ONLY`
系统变量 `@@global.tidb_enable_clustered_index` 本身的默认值为 `ON`

### 添加、删除聚簇索引

Expand Down
2 changes: 1 addition & 1 deletion system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ MPP 是 TiFlash 引擎提供的分布式计算框架,允许节点之间的数
- 作用域:SESSION | GLOBAL
- 是否持久化到集群:是
- 默认值:`INT_ONLY`
- 默认值:`ON`
- 可选值:`OFF``ON``INT_ONLY`
- 这个变量用于控制默认情况下表的主键是否使用[聚簇索引](/clustered-indexes.md)。“默认情况”即不显式指定 `CLUSTERED`/`NONCLUSTERED` 关键字的情况。可设置为 `OFF`/`ON`/`INT_ONLY`
- `OFF` 表示所有主键默认使用非聚簇索引。
Expand Down

0 comments on commit 5159b0d

Please sign in to comment.