I use a query to delete about 9,000,000 rows but no rows deleted what is the problem?
DELETE FROM `messages` WHERE last_change < 1332201600 && last_change !=0
//1332201600 is time stamp
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Deleting 9 million rows from a large table may take a long time. No rows will be deleted until the entire command completes and the transaction is committed. You have to be patient.
I would also check that your WHERE clause actually matches some rows. Try running this statement:
If this returns 10 rows (and it should if the information in your question is correct) then your original DELETE statement will delete at least those 10 rows.