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

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

php - HTTP_REFERER woes: How can I allow access to a specific page, only when a visitor has visited another specific page beforehand? -

java Extracting Zip file -