MySQL script to delete data in chunks until everything lower then id has been deleted
- by Chriswede
I need an MySQL Skript which does the following:
delete chunks of the database until it has deleted all link_id's greater then 10000
exmaple:
x = 10000
DELETE FROM pligg_links WHERE link_id > x and link_id < x+10000
x = x + 10000
...
So it would delete
DELETE FROM pligg_links WHERE link_id > 10000 and link_id < 20000
then
…