DELETE FROM `table`
WHERE (whatever criteria)
ORDER BY `id`
LIMIT 1000
Wash, rinse, repeat until zero rows affected. Maybe in a script that sleeps for a second or three between iterations.
More Related Contents:
- MySQL Error 1093 – Can’t specify target table for update in FROM clause
- Remove duplicate rows in MySQL
- How to do the Recursive SELECT query in MySQL?
- How to delete from multiple tables in MySQL?
- JOIN queries vs multiple queries
- MySQL DELETE FROM with subquery as condition
- SQL query: Delete all records from the table except latest N?
- MySQL indexes – what are the best practices?
- Subqueries with EXISTS vs IN – MySQL
- Deleting rows with MySQL LEFT JOIN
- mysql select from n last rows
- Difference in MySQL JOIN vs LEFT JOIN
- 60 million entries, select entries from a certain month. How to optimize database?
- Checking multiple columns for one value
- SQL DELETE with JOIN another table for WHERE condition
- Mysql Improve Search Performance with wildcards (%%)
- Whats the fastest way to lookup big tables for points within radius MySQL (latitude longitude)
- mysql, ifnull vs coalesce, which is faster?
- Mysql delete statement with limit
- Higher cardinality column first in an index when involving a range?
- How do I delete all the duplicate records in a MySQL table without temp tables
- MySQL “IN” queries terribly slow with subquery but fast with explicit values
- Delete from one table with join
- MySQL: Can I do a left join and pull only one row from the join table?
- MySQL LIMIT on DELETE statement
- Delete all rows with timestamp older than x days
- How to optimise MySQL queries based on EXPLAIN plan
- How to estimate SQL query timing?
- Deleting a row based on the max value
- delete rows from multiple tables