You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: system-variables.md
+41
Original file line number
Diff line number
Diff line change
@@ -751,6 +751,33 @@ MPP is a distributed computing framework provided by the TiFlash engine, which a
751
751
752
752
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.
753
753
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
+
754
781
### tidb_batch_pending_tiflash_count <span class="version-mark">New in v6.0</span>
755
782
756
783
- Scope: SESSION | GLOBAL
@@ -1088,6 +1115,10 @@ MPP is a distributed computing framework provided by the TiFlash engine, which a
1088
1115
- Unit: Rows
1089
1116
- 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.
1090
1117
- 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.
1091
1122
1092
1123
### tidb_enable_1pc <span class="version-mark">New in v5.0</span>
1093
1124
@@ -1163,6 +1194,16 @@ MPP is a distributed computing framework provided by the TiFlash engine, which a
1163
1194
- Default value: `OFF`
1164
1195
- This variable is used to determine whether to include the `AUTO_INCREMENT` columns when creating a generated column or an expression index.
1165
1196
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.
0 commit comments