What is the performance difference between “insert ignore” and replace in MySQL?

前端 未结 2 1309
星月不相逢
星月不相逢 2020-12-16 12:23

I would like to know if there is a difference in terms of performance between insert ignore and replace orders in MySQL.

I am using MySQL 5

2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-16 13:05

    Just a general comment. Insertion implies that what was there before remains. Replacing implies that something that is there already is targeted for removal and the item for insertion is installed in its place. The replacing action must inherently target a item that is already there, remove it and install the new item.

提交回复
热议问题