I have a MySQL database with about 400,000 records. First I ran this command:
SELECT url
, COUNT(url)
FROM url_list
GROUP
BY url
HAVING COUNT(url) > 1;
That command returned 39,121 records.
Oops.
One of the scripts I ran as I was experimenting didn't have the IGNORE set, so there are some duplicates.
To fix it, I ran this command:
DELETE t1
FROM url_list t1
JOIN contacts t2
WHERE t1.ID < t2.ID
AND t1.url = t2.url;
It's been about 15 minutes.
My computer is desktop with an i5 and 16GB RAM. HTOP says mysql is using 100% of the CPU. Is this just something where I need to wait, since I'm not really running on a powerful database server?
Also, what's the minimum hardware requirements for this to take 5 minutes or less, in your opinion. I'm just learning, but I'm having a blast with Python. I might want to upgrade someday.
question from:
https://stackoverflow.com/questions/65874644/is-this-process-supposed-to-take-this-long-or-did-i-do-something-wrong 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…