Hello! there is a mysql nameplate with 60 million entries, it has fields: ID, keyword (varchar 200), cat. It is necessary to leave only records with unique values of the field "keyword", and duplicates to remove. I found the following solution in the answers:
DELETE FROM keywords USING keywords, keywords t1 WHERE keywords.id> t1.id AND keywords.keyword = t1.keyword
I started mysql through the console, it has been hanging for several hours and I don’t know how long it will hang .. What can you advise?
distinct? - teranвисит уже несколько часов и не знаю, сколько еще будет висеть..ah, for a long time ... well, this is how many pairs you need to check - even if the indexes are used ... you cant wait for the process. It is much faster to copy data to a new table, where the index for this field is unique, and duplicates are ignored. - Akina