For MySQL DML operations, we recommend that you (I) INSERT large data volumes (I) replace a single row with multiple rows:
insert into t values (),(),(),...
(2)
LOAD DATA INFILE ... INTO TABLE t
(3) Write a temporary table and INSERT... SELECT (4) cancel the index and constraints, after the data is loaded, specify the DELAYED attribute when re-constructing the explain INSERT statement. Before InnoDB can be divided into multiple transactions and committed in batches (ii) large data volume UPDATE, you should also disable the index and related constraint ① unique SELECT field, change Field ② write the result set to the temporary table ③ create a composite index for the temporary table ④ each record of the temporary cyclic table ⑤ update the change field of the target table based on the unique field of the temporary table (3) Large data Volume DELETE ① partitioned table ② first obtain the unique identifier of the data to be deleted to the temporary table, and the cursor cyclically deletes data in batches.