I want to delete a large amount of records (~200K) from a large table (~500K records) in my MySql DB.
I want to make this call as efficient as possible because i dont want the DB to become "unresponsive" while executing the call.
I need to delete records that are "older" than 10 days (according to created_at
column), currently I use:
delete from table_name where created_at < DATE_SUB(CURDATE(),INTERVAL 10 DAY)
The table also have a primary key id
if it helps.
Any thoughts?