php - Most efficient way to move multiple rows at a time -
this short term solution long term problem...
i have database created else (isn't case). 1 particular table stores historical transactional data. when table becomes large, site performs crap. when can it, redesign database 3nf. until then, need limit table around 500,000 rows. want periodically run script move oldest rows archive table never used. let's moving 5-10k rows @ time, efficient way it?
this mysql database.
off top of head, figure count of number of rows. find out count - 500000 limit 1 id , move , id <= that.
do select, insert , delete or there better way it?
Comments
Post a Comment