Handling large deletes in MySQL
Last night, a simple delete query brought screener.in down. This is how the things went.
- One of the tables in the database had around 80 million rows.
- I ran a MySQL query to delete around 60 million rows.
- I went off to sleep and my remote shell got disconnected.
- 7 hours later, I woke to see the website performing very slowly.
- The disk utilisation showed writes of 80MB/s for the last 7+ hours.

After an hour of debugging, this is what solved it.
SET PERSIST innodb_redo_log_capacity = 4294967296; -- 4 GiB
Why did this happen?
I later learned that any …






