tencent cloud

TDSQL Boundless

Release Notes
Product Introduction
Overview
Scenarios
Product Architecture
Instance Types
Compatibility Notes
Kernel Features
Kernel Overview
Kernel Version Release Notes
Functionality Features
Performance Features
Billing
Billing Overview
Purchase Method
Pricing Details
Renewal
Overdue Payments
Refund
Getting Started
Creating an Instance
Connect to Instances
User Guide
Data Migration
Data Subscription
Instance Management
Configuration Change
Parameter Configuration
Account Management
Security Group
Backup and Restoration
Database Auditing
Tag Management
Use Cases
Technical Evolution and Usage Practices of Online DDL
Lock Mechanism Analysis and Troubleshooting Practices
Data Intelligent Scheduling and Related Practices for Performance Optimization
TDSQL Boundless Selection Guide and Practical Tutorial
Developer Guide
Developer Guide (MySQL Compatibility Mode)
Developer Guide (HBase Compatibility Mode)
Performance Tuning
Performance Tuning Overview
SQL Tuning
DDL Tuning
Performance White Paper
Performance Overview
TPC-C Test
Sysbench Test
API Documentation
History
Introduction
API Category
Making API Requests
Instance APIs
Security Group APIs
Task APIs
Backup APIs
Rollback APIs
Parameter APIs
Database APIs
Data Types
Error Codes
General Reference
System Architecture
SQL Reference
Database Parameter Description
TPC-H benchmark data model reference
Error Code Information
Security and Compliance
FAQs
Agreements
Service Level Agreement
Terms of Service
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary

BATCH LIMIT

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-03-12 12:03:38

Description

The BATCH statement splits large transactions into several small transactions. The entire process does not guarantee atomicity, but each batch maintains atomicity.
Currently, the BATCH statement supports the DELETE operation.

Syntax

BATCH LIMIT batch_size delete_stmt

Parameter Description

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.

Notes

Multi-table DELETE is not supported.
The BATCH statement cannot be nested within multi-statement transactions.
The batch_size must be a positive integer and cannot be zero.
The WHERE clause does not support the use of ORDER BY and LIMIT clauses.

Examples

As shown below, if the data to be deleted consists of 10,000 records with a batch_size of 2,000, a transaction commit is performed for every 2,000 records during deletion; meaning each small transaction contains 2,000 deletion operations.
BATCH LIMIT 2000 DELETE FROM sbtest1 WHERE id > 1000

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백