INSERT IGNORE vs INSERT ... ON DUPLICATE KEY UPDATE
Posted: 29 Nov 2014, 06:55
While executing an INSERT statement with many rows, I want to skip duplicate entries that would otherwise cause failure. After some research, my options appear to be the use of either:
- ON DUPLICATE KEY UPDATE - which implies an unnecessary update at some cost.
INSERT IGNORE - which implies an invitation for other kinds of failure to slip in unannounced.