This is something I learned about far too recently, considering how long I've been using MySQL. It turns out that when doing a bulk insert, you can have MySQL automatically update records on a key/index conflict. That way your bulk insert won't fail on duplicate records and you can insert/update in bulk in a single query.
"on duplicate index update"
This is something I learned about far too recently, considering how long I've been using MySQL. It turns out that when doing a bulk insert, you can have MySQL automatically update records on a key/index conflict. That way your bulk insert won't fail on duplicate records and you can insert/update in bulk in a single query.
Very cool!
dev.mysql.com/doc/refman/8.0/en/in...