Speeding up InnoDB Insert by Changing Default Settings

          Posted on 2007-06-21 02:51 開關 閱讀(271) 評論(0)  編輯  收藏 所屬分類: DATABASE

          InnoDB default options are very conservative and in several situations increasing the buffers can have a high impact on the performance. E.g. for speeding up inserts on a InnoDB-only setup, the rule of a thumb is to set the innodb_buffer_pool size to 50-80% of your computer's memory and to set innodb_log_file_size to about 25% of the innodb_buffer_pool_size.

          If you are running your program on several threads, which all work on
          the InnoDB table(s) you might want to also set
          innodb_flush_log_at_trx_commit=0
          This adds some risk of losing some transactions in the case of a
          power failure or an unclean mysqld shutdown, but it can improve
          speed.

          Please note that when inserting several rows at once in InnoDB table, it is fastest, if the rows are inserted in Primary Key order. This is because of the clustered index, which InnoDB always uses.

          If your system has a mix of several table handlers, then it is harder to provide good general settings for improving the speed, as the option settings heavily depend on your overall system design. In such cases you can contact us at consulting@mysql.com, and purchase online consulting. In Online Consulting our developers will log into your system and they will do extensive analysis of your system's requirements. Based on the research they can set proper settings for your MySQL installation or they can give you advice, how to make the needed changes by yourself in order to gain better performance.




          http://www.mysql.com/news-and-events/newsletter/2003-11/a0000000269.html
          主站蜘蛛池模板: 盐池县| 双城市| 吴桥县| 繁峙县| 岳池县| 九龙坡区| 乐都县| 沙湾县| 仙桃市| 安吉县| 灵石县| 黄冈市| 静宁县| 海宁市| 罗源县| 惠州市| 阿拉尔市| 福鼎市| 阿拉善右旗| 邳州市| 兴业县| 惠州市| 闽侯县| 和龙市| 分宜县| 抚松县| 子长县| 饶平县| 宣城市| 叶城县| 藁城市| 彝良县| 景德镇市| 太谷县| 泸州市| 抚顺县| 鄄城县| 札达县| 牡丹江市| 河西区| 安溪县|