All Products
Search
Document Center

ApsaraDB RDS:What do I do if the "Duplicate entry "...." for key "..."" error message appears when I use my ApsaraDB RDS for MySQL instance?

Last Updated:Aug 24, 2023

Problem description

When I execute DDL statements on my ApsaraDB RDS for MySQL instance, the following error message appears:

Duplicate entry "...." for key "..."

Causes

When you perform DDL operations, such as index creation and table engine modification, to build a table, a large number of data manipulation language (DML) operations are performed on the table. DDL operations in ApsaraDB RDS for MySQL are performed in phases. A large number of DML operations may cause data conflicts when DDL operations for incremental data merging are performed. As a result, the error message appears.

Solutions

Repeat the DDL operations.

Note If the error message appears frequently, reduce the number of concurrent DML operations.