(I) Insert large data volume
(1) Replace a single row with multi-row insert: 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, and re-build the data after loading.
Delayed attribute specified during insert
For InnoDB, partitions can be divided into multiple transactions and submitted in batches.
(Ii) large data volume update
Before that, we should disable indexes and related constraints.
① Select unique field, change field
② Write the result set to a temporary table
③ Create a composite index for a temporary table
④ Each record of the cyclic temporary table
⑤ Update the change field of the target table based on the unique field of the temporary table
(Iii) large data volume Delete
① Partitioned table
② Obtain the unique identifier of the data to be deleted to the temporary table and batch delete of the cursor Loop
By dba_waterbin
2013-07-25
Good luck