MySQL performance DELETE or UPDATE?

前端 未结 5 1666
旧巷少年郎
旧巷少年郎 2021-02-14 22:14

I have a MyISAM table with more than 10^7 rows. When adding data to it, I have to update ~10 rows at the end. Is it faster to delete them and then insert the new ones, or is it

5条回答
  •  甜味超标
    2021-02-14 23:04

    Rather than deleting or updating data for the sake of performance, I would consider partitioning.

    http://dev.mysql.com/doc/refman/5.1/en/partitioning-range.html

    This will allow you to retain the data historically and not degrade performance.

提交回复
热议问题