BATCH statement splits large transactions into several small transactions. The entire process does not guarantee atomicity, but each batch maintains atomicity.BATCH statement supports the DELETE operation.BATCH LIMIT batch_size delete_stmt
Parameter | Required | Description |
LIMIT batch_size | Required | Control the granularity of transaction splitting and set the size for each batch of non-transactional batch deletion. |
delete_stmt | Required | DELETE statement. |
BATCH statement cannot be nested within multi-statement transactions.batch_size must be a positive integer and cannot be zero.ORDER BY and LIMIT clauses are not supported within the WHERE clause.batch_size is 2000, a transaction is committed for every 2,000 rows during the deletion process. This means each small transaction contains 2,000 rows of data to be deleted.BATCH LIMIT 2000 DELETE FROM sbtest1 WHERE id > 1000
フィードバック