I have a table which is used every second pretty much and at some point of a day I need to do the following in my php script:
1. Block any incoming queries [SELECT, INSERT [most of them inserts 99%] etc]
2. Do table RENAME while no app can modify the table
3. After RENAME I create table like the one I renamed
4. Let apps access it again
I read a lot about different approaches but not sure which one to stick to.