MySQL optimizing INSERT speed being slowed down because of indices

前端 未结 5 2055
终归单人心
终归单人心 2020-12-03 01:42

MySQL Docs say :

The size of the table slows down the insertion of indexes by log N, assuming B-tree indexes.

Does this mean that for insertion of each new row

5条回答
  •  执笔经年
    2020-12-03 02:30

    If you are doing a bulk insert of a million rows, then dropping the index, doing the insert, and rebuilding the index will probably be faster. However, if your problem is that single row inserts are taking too long then you have other problems (like not enough memory) and dropping the index will not help much.

提交回复
热议问题