I'm running MySql 5MySQL5.5 with MMaster/SSlave replication (1 master, 2 slaves).
I have a process that runs once a week and truncate a specific table, the. The table is not large, and only has a few thousands records.
fromFor some reason, the truncateTRUNCATE TABLE
command takes really long time to execute (both on the master and on the slave) it. It takes about 400K ms to execute!! and whenWhen it runs on the slave, it casescauses it to lag from the masterMaster. afterAfter the truncate doTRUNCATE TABLE
finishes, everything is back to normal.
I know that one of the slaves didnt receiveddidn't receive any reads while performing the truncateTRUNCATE TABLE
since its a dedicated slave and the process that reads from that slave was down. Also, and also on this slave, it took the same amount of time to execute.
hereHere is the table structure: http://pastebin.com/qEQB4juR
anyAny thoughts on how I can speed up the truncateTRUNCATE TABLE ?