Speedup DROP huge MySQL replicated table
1
vote
2
answers
1364
views
I've a **huge InnoDB** table
customer_users_old
(**150G**) that it's not in use anymore in the database, it was renamed from customer_users
.
My setup has a **Master-Slave replication** of MySQL 5.5 with innodb_file_per_table
activated, so the table has it's own files.
As the DROP
command takes a lot of time, I'm afraid it can have some inpact on the prodcution database.
So I'm thinking on **disaling unique and foreign key checks for the session** as it was suggested on DROP TABLE on a huge InnoDB table :
SET FOREIGN_KEY_CHECKS=0;
SET UNIQUE_CHECKS=0;
And **disabling the binary log** to drop the table *first on the master* and *then on the slave* as it was suggested on Deleting data from a large table with replication :
SET sql_log_bin = 0;
Will this speedup the process and minimize the impact on the servers load?
Asked by pconcepcion
(137 rep)
May 3, 2017, 10:46 AM
Last activity: Sep 19, 2022, 06:21 AM
Last activity: Sep 19, 2022, 06:21 AM