Answer the question
In order to leave comments, you need to log in
How to remove duplicates in MySql table with 29 million rows?
What request will the system not get up for me during such an operation?
Answer the question
In order to leave comments, you need to log in
If it is possible to stop writing/changing the table, the fastest method would be the following scheme.
1.
Create a new table table2 with a structure similar to the original table1.
2.
insert into table2 (select distinct ... from table 1);
if the structure is complex, you can use group by If I were you, I wouldn't delete anything from the table. And I would simply create a new one, already without duplicates. In terms of resource consumption, it will be much more economical. And no one bothers to do this:
1. Selected the first hundred thousand, remember the id of the last entry.
2. Pause.
3. Selected the next hundred thousand starting from the last ID. Go that point two.
All.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question