mysql - Remove dulpicate rows from table in faster way -


what best way remove dulpicate rows large table(500000+ rows).
had code works not fast enough.
here code.

delete foo foo   inner join (select         link,         min(id) minid           foo           group link) b     on foo.link = b.link       , foo.id != b.minid 

please tell me anyother way faster code.
thanks.......

query:

delete f foo f (select min(f1.id)         (select * foo) f1        f1.link = f.link) != f.id 

query remove duplicate records between in id=50 id=100:

delete f foo f (select min(f1.id)         (select * foo) f1        f1.link = f.link) != f.id , f.id >= 50 , f.id <= 100 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -