When I deleted mysql data, there were 400,000 articles, why only a part of them were deleted at a time?

  mysql, question
DELETE FROM minute1_pp01temp WHERE id> 111352;
 
 ...
 ...
 
 [SQL] DELETE FROM minute1_pp01temp WHERE id> 111352;
 Affected rows: 448
 Time: 0.016s
 
 [SQL] DELETE FROM minute1_pp01temp WHERE id> 111352;
 Affected rows: 448
 Time: 0.016s

1. mysql deletes a large amount of data. Direct delete locks the table. It is convenient to use stored procedures to execute delete circularly.

For example:

DELIMITER $$
 CREATE PROCEDURE delete_temp_tab()
 Begin
 Repeat
 DELETE FROM test.`tab` WHERE id > 111352 LIMIT 1000;
 UNTIL ROW_COUNT()=0 END REPEAT;
 END $$
 DELIMITER ;
 CALL delete_temp_tab();
 DROP PROCEDURE IF EXISTS delete_temp_tab;

2. Either import the required data into a new table and delete the original table.