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 ...
随机推荐
- 洛谷P1084 运输计划
题目 题目要求使一条边边权为0时,m条路径的长度最大值的最小值. 考虑二分此长度最大值 首先需要用lca求出树上两点间的路径长度.然后取所有比mid大的路径的交集,判断有哪些边在这些路径上都有出现,然 ...
- uniapp登录流程详解uni.login
uni.login(OBJECT)登录 H5平台登陆注意事项: 微信内嵌浏览器运行H5版时,可通过js sdk实现微信登陆,需要引入一个单独的js,详见普通浏览器上实现微信登陆,并非开放API,需要向 ...
- FPGA综合的约束
近日发现,有些逻辑电路的综合时间约束和布局布线约束相差太大时,难以布通.此时,应该选择尽量接近的时钟约束.
- GoCN每日新闻(2019-11-05)
GoCN每日新闻(2019-11-05) GoCN每日新闻(2019-11-05) 1. Protobuf 终极教程 https://colobu.com/2019/10/03/protobuf-ul ...
- layui之table.render使用(含后台详细代码实现)
效果图如下: 前端实现代码如图(完整代码): <!DOCTYPE html> <html> <head> <meta charset="utf-8& ...
- FZU Monthly-201906 获奖名单
FZU Monthly-201906 获奖名单 冠军: 空缺 一等奖: 陈金杰 S031702334 空缺 二等奖: 黄海东 S031702647 吴宜航 S031702645 蔡煜晖 S111801 ...
- (转)ES6系列——let和const深入理解
原文:https://juejin.im/post/59e6a86d518825422c0cbb6f https://www.cnblogs.com/slly/p/9234797.html-----l ...
- 梳理数据库(MySQL)的主要知识点
一.数据库类型 常用的关系型数据库 Oracle:功能强大,主要缺点就是贵 MySQL:互联网行业中最流行的数据库,免费.关系数据库场景中的功能 MySQL 都能很好的满足 MariaDB:MySQL ...
- IPv4分类
IPv4地址按逻辑层次分为五类 A类 保留给政府机构 A类地址第1字节为网络地址,其它3个字节为主机地址.它的第1个字节的第一位固定为0. A类地址网络号范围:1.0.0.0 - 126.0.0.0 ...
- win10更改pip源
摘自:https://blog.csdn.net/qq_31443999/article/details/88750833 win10安装TensorFlow卡崩更改为国内清华大学镜像源,即可. 具体 ...