Skip to content

Commit d6e9ac6

Browse files
committed
add the variables of batch-dml
Signed-off-by: ekexium <eke@fastmail.com>
1 parent 8ec7d2c commit d6e9ac6

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

system-variables.md

+41
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,33 @@ MPP is a distributed computing framework provided by the TiFlash engine, which a
751751
752752
In the case of a poor network environment, appropriately increasing the value of this variable can effectively alleviate error reporting to the application end caused by timeout. If the application end wants to receive the error information more quickly, minimize the value of this variable.
753753
754+
### tidb_batch_commit
755+
- Scope: Session
756+
- Persists to cluster: No
757+
- Type: Boolean
758+
- Default value: `OFF`
759+
- This variable has been deprecated and does not take effect any more. It was used to control whether to enable the batch commit feature. When truned on, transactions may be split into multiple transactions and be committed non-atomically.
760+
761+
### tidb_batch_delete
762+
- Scope: Session
763+
- Persists to cluster: No
764+
- Type: Boolean
765+
- Default value: `OFF`
766+
- This variable is used to control whether to enable the batch delete feature, which is part of the deprecated batch-dml feature. When truned on, delete statements may be split into multiple transactions and be committed non-atomically. You must also turn on `tidb_enable_batch_dml` and set a positive `tidb_dml_batch_size` to make it work.
767+
768+
> **Warning:**
769+
> batch-dml is deprecated because it's easy to misuse it and cause data corruption. Consider using [non-transactional DML](/non-transactional-dml.md) instead.
770+
771+
### tidb_batch_insert
772+
- Scope: Session
773+
- Persists to cluster: No
774+
- Type: Boolean
775+
- Default value: `OFF`
776+
- This variable is used to control whether to enable the batch insert feature, which is part of the deprecated batch-dml feature. When truned on, insert statements may be split into multiple transactions and be committed non-atomically. You must also turn on `tidb_enable_batch_dml` and set a positive `tidb_dml_batch_size` to make it work.
777+
778+
> **Warning:**
779+
> batch-dml is deprecated because it's easy to misuse it and cause data corruption. Consider using [non-transactional DML](/non-transactional-dml.md) instead.
780+
754781
### tidb_batch_pending_tiflash_count <span class="version-mark">New in v6.0</span>
755782
756783
- Scope: SESSION | GLOBAL
@@ -1088,6 +1115,10 @@ MPP is a distributed computing framework provided by the TiFlash engine, which a
10881115
- Unit: Rows
10891116
- When this value is greater than `0`, TiDB will batch commit statements such as `INSERT` or `LOAD DATA` into smaller transactions. This reduces memory usage and helps ensure that the `txn-total-size-limit` is not reached by bulk modifications.
10901117
- Only the value `0` provides ACID compliance. Setting this to any other value will break the atomicity and isolation guarantees of TiDB.
1118+
- You must also turn on `tidb_enable_batch_dml` and at least one of `tidb_batch_insert` and `tidb_batch_delete` to use this feature.
1119+
1120+
> **Warning:**
1121+
> batch-dml is deprecated because it's easy to misuse it and cause data corruption. Consider using [non-transactional DML](/non-transactional-dml.md) instead.
10911122
10921123
### tidb_enable_1pc <span class="version-mark">New in v5.0</span>
10931124
@@ -1163,6 +1194,16 @@ MPP is a distributed computing framework provided by the TiFlash engine, which a
11631194
- Default value: `OFF`
11641195
- This variable is used to determine whether to include the `AUTO_INCREMENT` columns when creating a generated column or an expression index.
11651196
1197+
### tidb_enable_batch_dml
1198+
- Scope: GLOBAL
1199+
- Persists to cluster: Yes
1200+
- Type: Boolean
1201+
- Default values: `OFF`
1202+
- This variable contronls whether to enable the deprecated batch-dml feature. When it's enabled, certain statements may be split into multiple transactions, which means it's non-atomic and should be used with care. When using the feature you must ensure there is no concurrent opertaions on the data you are operating on. You must also specify a positive `tidb_batch_dml_size` and turn on at least one of `tidb_batch_insert` and `tidb_batch_delete` to make it work.
1203+
1204+
> **Warning:**
1205+
> batch-dml is deprecated because it's easy to misuse it and cause data corruption. Consider using [non-transactional DML](/non-transactional-dml.md) instead.
1206+
11661207
### tidb_enable_cascades_planner
11671208
11681209
> **Warning:**

0 commit comments

Comments
 (0)