Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: add some new tidb specific system variables #852

Merged
merged 5 commits into from
Aug 27, 2018
Merged
Changes from 2 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
55 changes: 55 additions & 0 deletions sql/tidb-specific.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,30 @@ TiDB 在 MySQL 的基础上,定义了一些专用的系统变量和语法用

这个变量用来设置顺序 scan 操作的并发度,AP 类应用适合较大的值,TP 类应用适合较小的值。

### tidb_projection_concurrency

作用域:SESSION | GLOBAL

默认值:4

这个变量用来设置 Projection 算子的并发度。

### tidb_hashagg_partial_concurrency

作用域:SESSION | GLOBAL

默认值:4

这个变量用来设置并行 hash aggregation 算法 partial 阶段的执行并发度。对于聚合函数参数不为 distinct 的情况,HashAgg 分为 partial 和 final 阶段分别并行执行。

### tidb_hashagg_final_concurrency

作用域:SESSION | GLOBAL

默认值:4

这个变量用来设置并行 hash aggregation 算法 final 阶段的执行并发度。对于聚合函数参数不为 distinct 的情况,HashAgg 分为 partial 和 final 阶段分别并行执行。

### tidb_index_join_batch_size

作用域:SESSION | GLOBAL
Expand Down Expand Up @@ -294,6 +318,37 @@ TiDB 在 MySQL 的基础上,定义了一些专用的系统变量和语法用
这个变量用来设置是否禁用显式事务自动重试,设置为 1 时,不会自动重试,如果遇到冲突需要在应用层重试。
是否需要禁用自动重试,请参考[自动重试的风险](./transaction-isolation.md#乐观事务注意事项)

## tidb_enable_table_partition

作用域:SESSION

默认值:0

这个变量用来设置是否开启 TABLE PARTITION 特性。

## tidb_backoff_lock_fast

作用域:SESSION | GLOBAL

默认值:100

这个变量用来设置读请求遇到锁的 backoff 时间
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add a period in the end of the sentence, to keep it consistent with others.


## tidb_ddl_reorg_worker_cnt

作用域: SESSION | GLOBAL

默认值:16

这个变量用来设置 DDL 操作 re-organize 阶段的并发度。

## tidb_ddl_reorg_priority

作用域:SESSION | GLOBAL

默认值:PRIORITY_NORMAL

这个变量用来设置 ADD INDEX 操作 re-organize 阶段的执行优先级, 可设置为 PRIORITY_LOW/PRIORITY_NORMAL/PRIORITY_HIGH。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Add the inline code format for ADD INDEX.
  • Modify the comma after "优先级" from the English version to the Chinese version, and delete the extra space after comma.


## Optimizer Hint

Expand Down