whenever I try a deleting operation on my phpmyAdmin MySQL database it freezes saying ‘Error 504’ once I run the command.
The operation is like the following:
DELETE t1 FROM downloads t1
INNER JOIN
downloads t2
WHERE
t1.ID < t2.ID AND t2.download = t2.download AND t2.place = t2.place AND t2.IP = t2.IP AND t2.data = t2.data
I have a table with dozens thousands entries and I just want to keep those with the highest ID and removing the otherd having lowest ID+same place+same IP+same data.
2
Answers
You can try below – your joining alias is not right you are trying
t2.download = t2.download
and so on which is wrongAs per comments, if you can take the system off-line for a couple of minutes, then I’d do this: