I have a table of c6m records. The id field is the unique primary key but MName, SName and Date/Time are not unique.
I want to delete all duplicate records whilst retaining one. The query below takes several hours to run on a reasonably powerful PC. Is there a quicker/more efficient way of doing this?
Thanks
DELETE t1 FROM r.test t1, r.test t2
WHERE t1.id > t2.id AND t1.MName = t2.MName AND t1.SName = t2.SName AND t1.`Date/Time` = t2.`Date/Time`