Skip to content

Commit 4910c2a

Browse files
yikekelilin90
authored andcommitted
sql: add new tidb specific system variables (#589)
* sql: add new tidb specific system variables Via: pingcap/docs-cn#852 * sql: address the comment
1 parent 965cd1d commit 4910c2a

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

sql/tidb-specific.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,26 @@ set @@global.tidb_distsql_scan_concurrency = 10
116116
- This variable is used to set the concurrency of the `serial scan` operation.
117117
- Use a bigger value in OLAP scenarios, and a smaller value in OLTP scenarios.
118118

119+
### tidb_projection_concurrency
120+
121+
- Scope: SESSION | GLOBAL
122+
- Default value: 4
123+
- This variable is used to set the concurrency of the `Projection` operator.
124+
125+
### tidb_hashagg_partial_concurrency
126+
127+
- Scope: SESSION | GLOBAL
128+
- Default value: 4
129+
- This variable is used to set the concurrency of executing the concurrent `hash aggregation` algorithm in the `partial` phase.
130+
- When the parameter of the aggregate function is not distinct, `HashAgg` is run concurrently and respectively in two phases - the `partial` phase and the `final` phase.
131+
132+
### tidb_hashagg_final_concurrency
133+
134+
- Scope: SESSION | GLOBAL
135+
- Default value: 4
136+
- This variable is used to set the concurrency of executing the concurrent `hash aggregation` algorithm in the `final` phase.
137+
- When the parameter of the aggregate function is not distinct, `HashAgg` is run concurrently and respectively in two phases - the `partial` phase and the `final` phase.
138+
119139
### tidb_index_join_batch_size
120140

121141
- Scope: SESSION | GLOBAL
@@ -237,6 +257,31 @@ set @@global.tidb_distsql_scan_concurrency = 10
237257
- Default: 0
238258
- This variable is used to set whether to disable automatic retry of explicit transactions. If you set this variable to 1, the transaction does not retry automatically. If there is a conflict, the transaction needs to be retried at the application layer. To decide whether you need to disable automatic retry, see [description of optimistic transactions](transaction-isolation.md#description-of-optimistic-transactions).
239259

260+
## tidb_enable_table_partition
261+
262+
- Scope: SESSION
263+
- Default value: 0
264+
- This variable is used to set whether to enable the `TABLE PARTITION` feature.
265+
266+
## tidb_backoff_lock_fast
267+
268+
- Scope: SESSION | GLOBAL
269+
- Default value: 100
270+
- This variable is used to set the `backoff` time when the read request meets a lock.
271+
272+
## tidb_ddl_reorg_worker_cnt
273+
274+
- Scope: SESSION | GLOBAL
275+
- Default value: 16
276+
- This variable is used to set the concurrency of the DDL operation in the `re-organize` phase.
277+
278+
## tidb_ddl_reorg_priority
279+
280+
- Scope: SESSION | GLOBAL
281+
- Default value: `PRIORITY_NORMAL`
282+
- This variable is used to set the priority of executing the `ADD INDEX` operation in the `re-organize` phase.
283+
- You can set the value of this variable to `PRIORITY_LOW`, `PRIORITY_NORMAL` or `PRIORITY_HIGH`.
284+
240285
## Optimizer Hint
241286

242287
On the basis of MySQL’s `Optimizer Hint` Syntax, TiDB adds some proprietary `Hint` syntaxes. When using the `Hint` syntax, the TiDB optimizer will try to use the specific algorithm, which performs better than the default algorithm in some scenarios.

0 commit comments

Comments
 (0)