当前位置:网站首页>MySQL configuration improves data insertion efficiency
MySQL configuration improves data insertion efficiency
2022-06-26 13:45:00 【It's strange that the eyes are full of human fireworks】
innodb_buffer_pool_size
innodb_buffer_pool_size The default value is 32M, It can be set to 128M.
This parameter indicates mysql Of Innodb A piece of storage engine to optimize query performance Memory buffer
show global VARIABLES like 'innodb_buffer_pool_size'
set global innodb_buffer_pool_size=1024*1024*128;innodb_flush_log_at_trx_commit
innodb_flush_log_at_trx_commit The default value is 1; Set to 0, Can increase write speed .
The value is 0: Increase write speed , But the security is poor ,mysql Server downtime may cause data loss .
The value is 1: Every time a transaction is committed or an instruction other than a transaction needs to write the log to the hard disk , This process takes a long time ;
show global variables like '%innodb_flush_log_at_trx_commit%'
set global innodb_flush_log_at_trx_commit=0;innodb_autoextend_increment
innodb_autoextend_increment The default value is 8M, It can be set to 128M
This configuration item is mainly used when tablespace When the space is full , need MySQL How much space does the system need to expand automatically , Every time tablespace Expansion will make each SQL In a waiting state . Add automatic expansion Size Can reduce the tablespace Number of automatic extensions .
show global variables like '%innodb_autoextend_increment%'
set global innodb_autoextend_increment = 128;innodb_log_buffer_size
innodb_log_buffer_size The default value is 1M, It can be set to 64M
This configuration item is used to set innodb Database engine write log cache ; Increasing this cache segment can reduce the number of times the database writes data files .
show global variables like '%innodb_log_buffer_size%'
set global innodb_log_buffer_size = 1024*1024*64;innodb_log_file_size
innodb_log_file_size The default value is 48M, It can be set to 128M
show global variables like '%innodb_log_file_size%'
set global innodb_log_file_size = 1024*1024*128;innodb_write_io_threads & innodb_read_io_threads
innodb_write_io_threads & innodb_read_io_threads The default value is 4, The range of allowed values is 1~64, It is recommended to modify according to the number of server cores ,8 The core is set to 8.
show global variables like '%innodb_write_io_threads%'
set global innodb_write_io_threads = 8;
show global variables like '%innodb_read_io_threads%'
set global innodb_read_io_threads = 8;innodb_io_capacity & innodb_io_capacity_max
innodb_io_capacity & innodb_io_capacity_max The default is 200,2000, Can be adjusted to 2000,10000.
show global variables like 'innodb_io_capacity%'
set global innodb_io_capacity = 2000;
set global innodb_io_capacity_max = 10000;边栏推荐
- Basic methods for network diagnosis and hardware troubleshooting of Beifu EtherCAT module
- 【Spark】. Explanation of several icons of scala file in idea
- What features are added to Photoshop 2022 23.4.1? Do you know anything
- There are many contents in the widget, so it is a good scheme to support scrolling
- Nexys A7开发板资源使用技巧
- Here Document免交互及Expect自动化交互
- Nlp-d60-nlp competition D29
- 2021-10-18 character array
- Variable declaration of typescript
- What is the use of index aliases in ES
猜你喜欢

mysql讲解(一)

三维向量的夹角

使用 Performance 看看浏览器在做什么

Basic type of typescript

Gurivat sprint Harbour Exchange listed: created “multiple first”, received 900 million yuan Investment from IDG capital

古瑞瓦特沖刺港交所上市:創下“多個第一”,獲IDG資本9億元投資

Beifu PLC model selection -- how to see whether the motor is a multi turn absolute value encoder or a single turn absolute value encoder

ES6 module

Beifu PLC based on NT_ Shutdown to realize automatic shutdown and restart of controller

Network remote access using raspberry pie
随机推荐
Wechat applet magic bug - choose to replace the token instead of clearing the token, wx Getstoragesync will take the old token value instead of the new token value
Calculate the distance between two points (2D, 3D)
Wechat applet -picker component is repackaged and the disabled attribute is added -- above
Zero basics of C language lesson 7: break & continue
shell脚本详细介绍(四)
Taishan Office Technology Lecture: four cases of using bold font
MySQL数据库讲解(四)
Ubuntu installation and configuration PostgreSQL (18.04)
古瑞瓦特沖刺港交所上市:創下“多個第一”,獲IDG資本9億元投資
虫子 内存管理 下 内存注意点
[node.js] MySQL module
MySQL讲解(二)
Lamp compilation and installation
嵌入式virlog代码运行流程
虫子 内存管理 上
基于PyTorch的生成对抗网络实战(7)——利用Pytorch搭建SGAN(Semi-Supervised GAN)生成手写数字并分类
A primary multithreaded server model
Guruiwat rushed to the Hong Kong stock exchange for listing: set "multiple firsts" and obtained an investment of 900million yuan from IDG capital
mysql配置提高数据插入效率
Tips for using nexys A7 development board resources