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

Perform Data Import (Bulk Loading Mode)

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-03-06 18:50:07
This section describes how to use the Bulk Load mode to rapidly load large volumes of data into databases.

Prerequisites

The source data files have been prepared and stored on the import host.
The target database and table have been created.
The import host and the TDSQL Boundless cluster can communicate properly.
Contact Tencent Cloud technical support to obtain the MyLoader tool.

Operation Steps

1. Use the root user to log in to the import host.
2. Go to the directory of the MyLoader tool.
cd /data/tdsql3_run/6008/SQLEngine/bin/
3. Run the following command to import data using the Bulk Load mode.
./myloader -h 10.34.159.202 -P 17110 -u test -p test123 -t 20 -B sbtest -d /data/TDSQLV30/Module8-409/TDSQL3-TOOLS/bin/loader_file -r 8000 -q 100 --max-threads-per-table=20 --max-retry-statement-count=10 --max-retry-checkpoint-count=10 --not-create-database --insert-ignore=True --append-if-not-exist --enable-tdsql-bulk-load -v 3
Parameter
Parameter Full Name
Description
--enable-tdsql-bulk-load
--enable-tdsql-bulk-load
Enable the Bulk Load mode for import.
--enable-tdsql-bulk-load-allow-unsorted
--enable-tdsql-bulk-load-allow-unsorted
It indicates that out-of-order primary key data is supported during Bulk Load imports.
When the records in the imported data files are not sorted by primary key, it is necessary to add --enable-tdsql-bulk-load-allow-unsorted.
-r
--rows
-r × -q is used to control the size of transactions. In Bulk Load mode, it is recommended that the data volume per transaction be between 100MB and 10GB.
When importing from data files (.sql), MyLoader does not generate transactions that span across multiple data files. This means that even if the -r × -q parameters are set to large values, if a .sql file contains only 1000 records, a transaction generated by MyLoader will consist of only those 1000 records and will not exceed the size of a single data file. Therefore, it is essential to ensure that the data files themselves are sufficiently large.
-q
--queries-per-transaction
-h
--host
TDSQL Boundless IP address for database connections.
-P
--port
TDSQL Boundless port for database connections.
-u
--user
TDSQL Boundless account for database connections.
-p
--password
-B
--database
Name of the target database.
-d
--directory
Specify the directory of the data files to be loaded.
-t
--threads
The number of threads used for loading data, defaults to 4.
--max-threads-per-table
--max-threads-per-table
The maximum number of threads used per table is used to set, defaults to 4.
--max-retry-statement-count
--max-retry-statement-count
Used to set the maximum number of times to retry a statement when a single query fails, defaults to 0.
--max-retry-checkpoint-count
--max-retry-checkpoint-count
Used to set the maximum number of retries when a checkpoint error occurs, defaults to 0.
--not-create-database
--not-create-database
MyLoader will not create a database but will attempt to import data into the specified database. If the specified database does not exist, MyLoader will report an error and halt the import process.
--insert-ignore
--insert-ignore
Enable the INSERT IGNORE statement when duplicate primary key records are inserted.
--append-if-not-exist
--append-if-not-exist
Add the IF NOT EXISTS clause to the CREATE TABLE statement.
-v
--verbose
Set the verbosity level of log output.
0: Silent mode, outputs no information.
1: Outputs only error messages.
2 (default value): Outputs warning messages and error messages.
3: Outputs informational messages, warning messages, and error messages.
4: Outputs debug messages, informational messages, warning messages, and error messages.

도움말 및 지원

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

피드백