tencent cloud

DokumentasiTDSQL-C for MySQL

Parallel DDL

Download
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-08-03 11:45:29
Diterjemahkan oleh AI
TDSQL-C for MySQL (with the TXSQL kernel) provides parallel DDL capabilities. This capability is implemented based on the Parallel Reader framework at the InnoDB layer. It leverages multi-core CPUs and storage I/O bandwidth to significantly reduce data copy time, thereby shortening the overall DDL execution time, preventing the blocking of subsequent related DML operations, and reducing the waiting time for DDL operations.

Supported Versions

TDSQL-C for MySQL 8.0, Community Edition version 8.0.22 or 8.0.30.

Use Limits

Currently, parallel DDL cannot be used in the following scenarios:
The innodb_txsql_parallel_ddl switch is not enabled.
The table size is relatively small.
Create an index using an AUTO_INCREMENT column.
Create a spatial index.
Create an fts index.
The index contains a multi-value column.
The index contains a virtual column.

Parameter Description

The parallel DDL capability of TDSQL-C for MySQL is enabled through parameter configuration. Depending on the kernel version, it falls into the following two scenarios:
Scenario 1: When the kernel version is 3.1.14 or earlier, control it through the innodb_parallel_ddl, innodb_ddl_threads, and innodb_ddl_buffer_size parameters.
Parameter Name
Restart
Global Parameter
Default Value
Modifiable Parameter Values
Description
innodb_parallel_ddl
Yes
Yes
OFF
OFF | ON
Parallel DDL feature switch.
OFF: Disable the parallel DDL feature.
ON: Enable the parallel DDL feature.
innodb_ddl_threads
Yes
Yes
4
[1 - 256]
Controls the number of parallel threads for each DDL operation.
A value of 1 indicates that DDL operations are executed in single-threaded mode.
innodb_ddl_buffer_size
Yes
Yes
10485760
[1048576 - 536870912]
Controls the memory size for storing sampled data during parallel index creation.
Scenario 2: When the kernel version is 3.1.15 or later, control it through the innodb_txsql_parallel_ddl, innodb_txsql_ddl_threads, and innodb_txsql_ddl_buffer_size parameters.
Parameter Name
Restart
Global Parameter
Default Value
Modifiable Parameter Values
Description
innodb_txsql_parallel_ddl
Yes
Yes
OFF
OFF | ON
Parallel DDL feature switch.
OFF: Disable the parallel DDL feature.
ON: Enable the parallel DDL feature.
innodb_txsql_ddl_threads
Yes
Yes
4
[1 - 256]
Controls the number of parallel threads for each DDL operation.
A value of 1 indicates that DDL operations are executed in single-threaded mode.
innodb_txsql_ddl_buffer_size
Yes
Yes
10485760
[1048576 - 536870912]
Controls the memory size for storing sampled data during parallel index creation.

Usage Notes

-- When the kernel version is 3.1.14 or earlier
SET innodb_parallel_ddl = ON;
SET innodb_ddl_threads = 4; // This setting relates to instance specifications. You can increase the number of parallel threads when the specifications are high.

-- When the kernel version is 3.1.15 or later
SET innodb_txsql_parallel_ddl = ON;
SET innodb_txsql_ddl_threads = 4; // This setting relates to instance specifications. You can increase the number of parallel threads when the specifications are high.


Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan