I would like to know if there is a difference in terms of performance between insert ignore and replace orders in MySQL.
I am using MySQL 5.0.31. All my tables are in InnoDB.
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.
insert ignore – if key/row exists, skip insertion
replace – if key/row exists, delete the match row, and insert again
So,
replaceshould be slower.But
insert ignoredoes not do the updatedetails : http://dev.mysql.com/doc/refman/5.5/en/replace.html