Probably a bit too late but it could be usefull for someone else :
Duplicates can be found by using the neighbor function instead of GROUP BY, it requires much less RAM.
An example to find the first duplicate on a pseudo-PK composed by 2 fields
SELECT pkField1,pkField2
FROM (SELECT pkField1,pkField2 FROM myTable ORDER BY pkField1,pkField2)
WHERE (pkField1,pkField2)=neighbor((pkField1,pkField2), -1)
LIMIT 1