Do you ever use "ON DUPLICATE KEY UPDATE"? (MySQL) |
(09-07-2016, 03:06 PM)daveĀ friend Wrote: I think the performance hit on this sort of statement comes when you are trying to update the key of an existing record. Otherwise, it performs on par with an insert or update. REPLACE is actually different, in that it deletes the row and then creates an entirely new row. I suppose it accomplishes the same thing, but I haven't tested it out. Since the website I'm working on is running on CI 2.x with plans to upgrade but at the end of a very long list of things to do, I'd have to create a replace function too. |
Messages In This Thread |
Do you ever use "ON DUPLICATE KEY UPDATE"? (MySQL) - by skunkbad - 09-04-2016, 11:28 AM
RE: Do you ever use "ON DUPLICATE KEY UPDATE"? (MySQL) - by InsiteFX - 09-05-2016, 04:45 AM
RE: Do you ever use "ON DUPLICATE KEY UPDATE"? (MySQL) - by skunkbad - 09-05-2016, 02:48 PM
RE: Do you ever use "ON DUPLICATE KEY UPDATE"? (MySQL) - by InsiteFX - 09-06-2016, 03:17 AM
RE: Do you ever use "ON DUPLICATE KEY UPDATE"? (MySQL) - by dave friend - 09-07-2016, 03:06 PM
RE: Do you ever use "ON DUPLICATE KEY UPDATE"? (MySQL) - by skunkbad - 09-07-2016, 04:22 PM
|