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
.ibd
files. 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 ...
随机推荐
- 计蒜客 41387.XKC's basketball team-线段树(区间查找大于等于x的最靠右的位置) (The Preliminary Contest for ICPC Asia Xuzhou 2019 E.) 2019年徐州网络赛
XKC's basketball team XKC , the captain of the basketball team , is directing a train of nn team mem ...
- kafka部署在云服务器(centOS 6.5),本地远程连接问题
kafka简介 Apache Kafka发源于LinkedIn,于2011年成为Apache的孵化项目,随后于2012年成为Apache的主要项目之一.Kafka使用Scala和Java进行编写.Ap ...
- 【luoguP3000】 [USACO10DEC]牛的健美操Cow Calisthenics
题目链接 二分答案,判断需要断几条边,用\(f[i]\)表示以\(i\)为根的子树断边后的最长路径,对于一个点\(u\),存在\(f[v]>mid\)时就删到\(v\)的边\(f[v1]+f[v ...
- wireshark安装和使用 -基础篇
使用前知道: wireshark版本:3.0.2 使用wireshark的目的是因为它支持linux/windows/mac,而且新版本是开源免费的.还有一个原因是使用Fiddler不支持mac.截止 ...
- [Beta]Scrum Meeting#1
github 本次会议项目由PM召开,时间为5月6日晚上10点30分 时长15分钟 任务表格 人员 昨日工作 下一步工作 木鬼 beta初步计划 撰写博客整理文档 swoip 前端改进计划 模块松耦合 ...
- git推送本地分支到远程仓库并在远程仓库创建新分支
$ git push <远程主机名> <本地分支名>:<远程分支名> git push master test:test #master 为设置的远程仓库别名,第一 ...
- com.alibaba.druid.pool.DruidPooledConnection cannot be cast to oracle.jdbc.OracleConnection 异常解决办法
java.lang.ClassCastException: com.alibaba.druid.pool.DruidPooledConnection cannot be cast to oracle. ...
- 码云push时提示 DeployKey does not support push code fatal: Could not read from remote repository.
一.如果需要push代码到码云,需要创建个人公钥,公共公钥只可以读不可以修改 二.执行代码即可:git push
- idel上传代码到github时遇到的Push rejected: Push to origin/master was rejected
1 没有权限 2 先pull之后,再push即可
- PMP 第4章错题总结
变更步骤: 1.配置管理活动:配置识别.配置状态记录.配置核实与审计2.项目章程中记录项目的目的和总体预算3.变更控制系统规定了变更管理流程及批准的权限4.项目章程是授权项目经理动用组织资源的文件5. ...