Fastest way to delete matching rows in MySQL?
Question
I have more than 10 million records in a table. I want to delete the
records where the email column contains .ac.
.
What is the fastest method to perform the task?
Table Schema
CREATE TABLE `master` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`email` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
Delete Query
DELETE FROM `master` WHERE ( email LIKE "%.ac.%" );
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange