Home >Database >Mysql Tutorial >怎么提高mysql的插入速度

怎么提高mysql的插入速度

WBOY
WBOYOriginal
2016-06-07 16:23:441543browse

如何提高mysql的插入速度 1.使用MyISAM类型; 2.批量提交batch; 3.插入时去掉索引,插入后再创建索引 4.存储引擎的唯一性校验关掉; 5.自动事物提交关掉,批量提交后再提交事务; 6.使用insert delayed方法; 7.使用load data infile; 8.增加key_buffer_siz

如何提高mysql的插入速度

1.使用MyISAM类型;

2.批量提交batch;

3.插入时去掉索引,插入后再创建索引

4.存储引擎的唯一性校验关掉;

5.自动事物提交关掉,批量提交后再提交事务;

6.使用insert delayed方法;

7.使用load data infile;

8.增加key_buffer_size值来扩大键高速缓冲区。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn