MySQL Forums
Forum List  »  Performance

UPDATE .. WHERE or INSERT .. ON DUPLICATE KEY UPDATE?
Posted by: Daniel Chiaramello
Date: December 04, 2014 05:05AM

Hello all.

I was wondering the potential gains of using UPDATE ... WHERE ... instead of IODKU requests, so I performed some quick tests, and I am very puzzled by the fact that the IODKU were (a little) faster that UPDATE...WHERE ones.

I am perfectly aware that my tests are not representative at all, but I was expecting the opposite.

So, my question: in general, should we use UPDATE ... WHERE instruction when we know that the entry already exists, or INSERT ... ON DUPLICATE KEY UPDATE one?

Thanks for your attention,
Daniel

Options: ReplyQuote


Subject
Views
Written By
Posted
UPDATE .. WHERE or INSERT .. ON DUPLICATE KEY UPDATE?
2337
December 04, 2014 05:05AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.