views:

57

answers:

1

I am trying to rotate out an innoDB table which has a high number of transaction, so I need to lock all the tables involved.

With the tables locked I cannot use RENAME to move data around using auxiliary tables.

And if I do an INSERT, then I have to worry about the integrity of the ids.

Any suggestions? Is this even possible

A: 

Can you do the rotation in the log? Have 7 tables - one for each day of the week - and have your queries to take the current day into account, or even better, wrap the insert with a stored procedure. Same goes for 24 tables for hourly rotation, 12 for monthly rotation, etc.

David Rabinowitz