Thanks for the tips.<p>I am not sure in which cases the MySQL one doesn&#x27;t work correctly.
ON DUPLICATE KEY UPDATE checks every unique fields in table, not just PRIMARY key.<p>Also, I&#x27;ll try these suggestions, but you can see that it can be frustrating that simple queries don&#x27;t work quickly or randomly work really slowly and you have to find some configuration settings to hand tune.