On a table with about 1.7M rows, I tried to delete duplicates posts:
delete a FROM comment a
INNER JOIN comment a2
WHERE a.id < a2.id
AND a.body = a2.body;
The result was:
Query OK, 35071 rows affected (5 hours 36 min 48.79 sec)
This happened on my almost idle workstation with Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
.
I'm wondering if there are some tricks to make this delete operation faster?