I request that in most cases the existing record will be updated. However, I need to check if these entries exist, and if not, I have to create it.
Normally, I would use it INSERT...ON DUPLICATE KEY UPDAT, but since only a few queries are required, I thought about doing it UPDATEand the last check if the returned one ROW_COUNT()is zero and does INSERTin this case.
What will give me the best performance?
source
share