MySQL Insert performance degrades on a large table

前端 未结 6 832
粉色の甜心
粉色の甜心 2020-12-30 02:48

I\'m working with a huge table which has 250+ million rows. The schema is simple.

CREATE TABLE MyTable (
        id BIGINT PRIMARY KEY AUTO_INCREMENT,
              


        
6条回答
  •  生来不讨喜
    2020-12-30 02:59

    I'll second @MarkR's comments about reducing the indexes. One other thing you should look at is increasing your innodb_log_file_size. It increases the crash recovery time, but should help. Be aware you need to remove the old files before you restart the server.

    General InnoDB tuning tips: http://www.mysqlperformanceblog.com/2007/11/01/innodb-performance-optimization-basics/

    You should also be aware of LOAD DATA INFILE for doing inserts. It's much faster.

提交回复
热议问题