Skip to content

Commit

Permalink
Update v2.1/sql/tidb-specific.md
Browse files Browse the repository at this point in the history
Co-Authored-By: crazycs520 <crazycs520@gmail.com>
  • Loading branch information
CaitinChen and crazycs520 authored Feb 24, 2019
1 parent 86ca585 commit 8c5edce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion v2.1/sql/tidb-specific.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ set @@global.tidb_distsql_scan_concurrency = 10

默认值:1024

这个变量用来设置 DDL 操作 re-organize 阶段的 batch size 大小。比如 Add Index 操作,需要回填索引数据,通过并发 tidb_ddl_reorg_worker_cnt 个 worker 一起回填数据,每个 worker 是一个 batch 一个 batch 的回填的。如果 add index 时有 update 操作或者 replace 等更新操作较多,batch size 越大,事务冲突的概率也会越大,此时建议改小 batch size 的大小,最小值是32。在没有事务冲突的情况下,batch size 可以设置大些,最大值是10240,这样回填数据的速度更快,当然 tikv 的写入压力也会变大。
这个变量用来设置 DDL 操作 re-organize 阶段的 batch size。比如 Add Index 操作,需要回填索引数据,通过并发 tidb_ddl_reorg_worker_cnt 个 worker 一起回填数据,每个 worker 是以 batch 为单位进行回填。如果 Add Index 时有较多 Update 操作或者 Replace 等更新操作,batch size 越大,事务冲突的概率也会越大,此时建议调小 batch size 的值,最小值是 32。在没有事务冲突的情况下,batch size 可设为较大值,最大值是 10240,这样回填数据的速度更快,但是 TiKV 的写入压力也会变大。

### tidb_ddl_reorg_priority

Expand Down

0 comments on commit 8c5edce

Please sign in to comment.