# Split The Big Transaction

+ It is recommended to split large transactions into small transaction to increase the probability of successful transaction submission to a certain extent
![center](./student-guide/diagram/23-split-01-01.png)
-------------------------------------------------------------
Since v4.0.0, TiDB has started to support 10G large transactions, but the actual size limit of a single transaction also depends on the remaining available memory of the server. At the same time, the memory consumption of the TiDB process when executing a transaction is approximately more than 6 times the transaction size.

Taking pessimistic transactions as an example, this is due to the fact that before the transaction commits:

- TiDB executes DML first to get the modified key and then locks it
- Data modifications will be cached in the MemBuffer of TiDB Server
- Conflicts are detected and data is written to the TiKV layer only when submitted

Therefore, you also need to pay attention to the memory usage caused by large transactions. In a production environment, it is recommended to split large transactions into small transactions to improve the probability of successful transaction submission and reduce the cost of transaction rollback to a certain extent.

