sql - MySQL how do i delete duplicate rows from very large table? -
I should know the most effective way to remove duplicated rows from a large table, (1 billion in this table More lines) I have to know a very efficient way of doing this, because I can take a few days if I execute ineffective queries.
I need to delete all the duplicate URLs in the search table,
Depending on your index completely, do it in two steps: (1 ) Together with any other field, support your DBMS on the URL field create the highest-selection index, which can distinguish records with the same URL, such as the primary key or time stamp field; (2) To process a small fraction, write the procedural code (not just one query) if records at one time and results in these small batches, eg. PK mod 1000, or before the TLD portion, 3 letters of the URL harvesting. This is the best way to get an estimated result, unless you are not sure that a simple query will be required during the long cycle of memory, log file location, etc. DB will not run out of the process. It removes Delete the search from the URL (URL from the search URL SELECT url) select url) X);
Comments
Post a Comment