Does table size affect INSERT performance?

假装没事ソ 提交于 2019-12-04 06:17:53

My experience has been that performance degrades if the dataset index no longer fits in memory. Once that happens, checks for duplicate indexes will have to hit disk and it will slow down considerably. Make a table with as much data as you think you'll have to deal with, and do some testing and tuning. It's really the best way to know what you'll run into.

Larry Lustig

Yes, but it's not the size of the table per se but the size of the indices that matter. Once index rewriting begins to thrash the disk, you'll notice a slowdown. A table with no indexes (of course, you'd never have such a thing in your database) should see no degradation. A table with minimal compact indexes can grow to a very relatively large size without seeing degradation. A table with many large indices will start to degrade sooner.

Danny

I can only share my experience. hope it helps.

I am inserting lots of rows at the time, on huge database (several millions of entries). I have a script which prints the time before and after I execute the inserts. well I haven't seen any drop in performances.

Hope it gave you an idea, but I am on sqlite not on mysql.

The speed is not affected as long as MySQL can update the full index in memory, when it begins to swap out the index it becomes slower. This is what happens if you rebuild an enormous index instantly using ALTER TABLE.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!