Skip to content

Commit

Permalink
sql: fix the scope of some tidb variables (#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
lilin90 committed May 25, 2018
1 parent c55f064 commit def503c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sql/tidb-specific.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ If you need to set the global variable, run:

### tidb_import_data

- Scope: SESSION | GLOBAl
- Scope: SESSION
- Default value: 0
- This variable indicates whether to import data from the dump file currently.
- To speed up importing, the unique index constraint is not checked when the variable is set to 1.
Expand Down Expand Up @@ -126,21 +126,21 @@ If you need to set the global variable, run:

### tidb_batch_insert

- Scope: SESSION | GLOBAL
- Scope: SESSION
- Default value: 0
- This variable is used to set whether to divide the inserted data automatically. It is valid only when `autocommit` is enabled.
- When inserting a large amount of data, you can set the variable value to true. Then the inserted data is automatically divided into multiple batches and each batch is inserted by a single transaction.

### tidb_batch_delete

- Scope: SESSION | GLOBAL
- Scope: SESSION
- Default value: 0
- This variable is used to set whether to divide the data for deletion automatically. It is valid only when `autocommit` is enabled.
- When deleting a large amount of data, you can set the variable value to true. Then the data for deletion is automatically divided into multiple batches and each batch is deleted by a single transaction.

### tidb_dml_batch_size

- Scope: SESSION | GLOBAL
- Scope: SESSION
- Default value: 20000
- This variable is used to set the automatically divided batch size of the data for insertion/deletion. It is only valid when `tidb_batch_insert` or `tidb_batch_delete` is enabled.
- When the data size of a single row is very large, the overall data size of 20 thousand rows exceeds the size limit for a single transaction. In this case, set the variable to a smaller value.
Expand Down

0 comments on commit def503c

Please sign in to comment.