mysql 导入sql大文件
引自:https://dba.stackexchange.com/questions/83125/mysql-any-way-to-import-a-huge-32-gb-sql-dump-faster
innodb_buffer_pool_size = 4G
innodb_log_buffer_size = 256M
innodb_log_file_size = 1G
innodb_write_io_threads = 16
innodb_flush_log_at_trx_commit = 0
- innodb_buffer_pool_size will cache frequently read data
- innodb_log_buffer_size : Larger buffer reduces write I/O to Transaction Logs
- innodb_log_file_size : Larger log file reduces checkpointing and write I/O
- innodb_write_io_threads : Service Write Operations to
.ibdfiles. According to MySQL Documentation onConfiguring the Number of Background InnoDB I/O Threads, each thread can handle up to 256 pending I/O requests. Default for MySQL is 4, 8 for Percona Server. Max is 64. - innodb_flush_log_at_trx_commit
- In the event of a crash, both 0 and 2 can lose once second of data.
- The tradeoff is that both 0 and 2 increase write performance.
- I choose 0 over 2 because 0 flushes the InnoDB Log Buffer to the Transaction Logs (ib_logfile0, ib_logfile1) once per second, with or without a commit. Setting 2 flushes the InnoDB Log Buffer only on commit. There are other advantages to setting 0 mentioned by @jynus, a former Percona instructor
mysql 导入sql大文件的更多相关文章
- MySQL导入sql 文件的5大步骤
http://database.51cto.com/art/201005/200739.htm 以下的文章主要介绍的是MySQL导入sql 文件,即MySQL数据库导入导出sql 文件的实际操作步骤, ...
- MySQL导入sql文件,过大导致错误
--导入sql脚本文件,报错: Navicat 导入数据报错 --- 1153 - Got a packet bigger than 'max_allowed_packet' bytes2006 - ...
- mysql执行sql脚本文件
mysql执行sql脚本文件 方法一:使用cmd命令执行(windows下,unix或Linux在的其控制台下) [MySQL的bin目录]\mysql –u用户名 –p密码 –D数据库<[sq ...
- Navicat 导入sql脚本文件
Navicat 导入sql脚本文件 我在组建自己工作用的数据库时要导入.sql脚本文件,用cmd窗口导入太慢,navicat的导入向导里又无导入sql脚本的选项, 但不是navicat中没有导入sql ...
- MYSQL导入CSV格式文件数据执行提示错误(ERROR 1290): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement.
MYSQL导入CSV格式文件数据执行提示错误(ERROR 1290): The MySQL server is running with the --secure-file-priv option s ...
- MySQL导入较大sql文件报错max_allowed_packet
1.查看当前最大允许导入sql文件大小 show VARIABLES like '%max_allowed_packet%'; 2.修改方式 1.永久生效 修改my.cnf文件 vim /etc/my ...
- mysql 导入sql文件,source命令
转自:http://blog.sina.com.cn/s/blog_610997850100mwv8.html 今天碰到个问题要用phpmyadmin导入1G的数据,但是在怎么都导入不了,用命令行就可 ...
- Mysql导入Sql文件时报Error Code: 2013 - Lost connection to MySQL server during query
MySql 有时我们导入sql文件,文件过大,导致Error Code: 2013 - Lost connection to MySQL server during query这种错误 执行以下: S ...
- MySQL导入SQL文件及常用命令
在MySQL Qurey Brower中直接导入*.sql脚本,是不能一次执行多条sql命令的,在mysql中执行sql文件的命令: mysql> source d:/myprogr ...
随机推荐
- 修改git 的远程URL
git remote set-url origin ssh://git@gitlab.tian-wang.com:8022/test/api-automation.git
- asp.net core 使用 Serilog
安装NuGet包 PM> Install-Package SerilogPM> Install-Package Serilog.AspNetCorePM> Install-Packa ...
- Python3+mitmproxy安装使用教程(Windows)(转载)
mitmproxy 是用于MITM的proxy,MITM中间人攻击.说白了就是服务器和客户机中间通讯多增加了一层.跟Fiddler和Charles最大的不同就是,mitmproxy可以进行二次开发,尤 ...
- Cesium原理篇:6 Render模块(6: Instance实例化)【转】
https://www.cnblogs.com/fuckgiser/p/6027520.html 最近研究Cesium的实例化,尽管该技术需要在WebGL2.0,也就是OpenGL ES3.0才支持. ...
- 哈希表查找(散列表查找) c++实现HashMap
算法思想: 哈希表 什么是哈希表 在前面讨论的各种结构(线性表.树等)中,记录在结构中的相对位置是随机的,和记录的关键字之间不存在确定的关系,因此,在结构中查找记录时需进行一系列和关键字的比较.这一类 ...
- curl 参数配置详解
第一类:对于下面的这些option的可选参数,value应该被设置一个bool类型的值: CURLOPT_AUTOREFERER当根据Location:重定向时,自动设置header中的Referer ...
- Annotation-based argument resolution 部分2
HandlerMethodArgumentResolver的抽象實現AbstractNamedValueMethodArgumentResolver下的子类 部分1 RequestParamMapM ...
- [转]C/C++实现回调机制的几种方式(回调、槽、代理)
转自:https://www.jianshu.com/p/4f907bba6d5f (1)Callback方式(回调) Callback的本质是设置一个函数指针进去,然后在需要需要触发某个事件时调用该 ...
- 原生微信小程序脚手架(支持npm)
微信小程序支持npm 为了支持生态扩展,社区贡献者可以提供更加丰富的功能,已经支持了第三方小程序开发功能,见如下地址. 微信小程序支持npm https://developers.weixin.qq. ...
- intellij查找接口的实现类
拿MyBatis的SqlSession为例 第一步:先找到这个接口 第二步:右击选择 再选择 第三步: 会得到如下 右击Closeable,因为SqlSession实现了它,选择Show Inplem ...