tencent cloud

DokumentasiTDSQL-C for MySQL

Write Failures and Instance Anomalies Caused by a Single 64TB Table

Unduh
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-06-26 15:00:08

Issue

In TDSQL-C for MySQL, a single InnoDB tablespace (that is, the physical storage corresponding to a single table) has an upper limit of 64 TB. Write operations fail when the table data size approaches 64 TB. In severe cases, this may trigger instance exceptions and service interruptions.
The 64 TB limit applies to a single table, not to the total capacity of the instance.
When the physical size of a table approaches or reaches 64 TB, the table cannot be written to further. This may cause exceptions in the instance.

Problem Triggering Scenario

Pay close attention when the following conditions are met, as they may trigger this issue.
Business tables experience long-term, monotonous growth and are not partitioned or sharded.
A single oversized table exists, and its data + indexes continue to accumulate.
The data volume of a single table has reached the terabyte (TB) level and is still increasing rapidly.

Involved Engine Versions

Engine Version
Involved or Not
MySQL 5.7
Yes
MySQL 8.0
Yes

Solution Analysis

Upgrading the kernel cannot overcome the 64 TB limit for a single table.
The recommended approach is to proactively plan + perform online migration/splitting, and handle the table before it approaches the upper limit.

Solution Guidance

1. Viewing the Table with the Highest Occupancy

It is recommended that you periodically run the following SQL to identify the top 10 tables by storage usage, and pay special attention to the leading large tables.
MySQL 5.7: Refer to the Following SQL
MySQL 8.0: Refer to the Following SQL
set session sql_mode='';
select t.table_schema,
t.table_name,
(data_length + index_length)/1024/1024/1024 as size_G
from information_schema.tables t
join information_schema.INNODB_SYS_TABLES syst
on concat(t.table_schema,'/',t.table_name) = substring_index(syst.NAME,'#',1)
where syst.SPACE = 0
group by t.table_schema, t.table_name
order by size_G desc
limit 10;
set session sql_mode='';
select t.table_schema,
t.table_name,
(data_length + index_length)/1024/1024/1024 as size_G
from information_schema.tables t
join information_schema.INNODB_TABLES syst
on concat(t.table_schema,'/',t.table_name) = substring_index(syst.NAME,'#',1)
where syst.SPACE = 0
group by t.table_schema, t.table_name
order by size_G desc
limit 10;

2. Online Data Migration

For the large tables at the top of the query results, you can perform online table rebuilds to reorganize / migrate the tables, thereby reducing the risk posed by data volume approaching the single-table limit.
ALTER TABLE $db.$tb ENGINE = INNODB, ALGORITHM=INPLACE, LOCK=NONE;
$db: When you run the command, replace this parameter with your database name.
$tb: When you run the command, replace this parameter with the table name under your selected database.

Recommendations

1. Regular Inspection: Periodically check the storage usage of the top 10 large tables using the SQL provided above for identifying the tables with the highest usage.
2. Timely Migration: Perform online migration and rebuild for the leading large tables.
3. Properly Control Table Data Growth: For oversized tables, use partitioning / splitting / archiving to control the size of a single table from the source.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan