Use repeat_exec() to delete huge amount of rows in smaller chunks, with sleeping interval:
mysql> call repeat_exec(2, 'DELETE FROM sakila.rental WHERE customer_id=7 ORDER BY rental_id LIMIT 1000', 0);
Blog đang chỉnh sửa
mysql> call repeat_exec(2, 'DELETE FROM sakila.rental WHERE customer_id=7 ORDER BY rental_id LIMIT 1000', 0);
0 comments:
Post a Comment