当前位置:网站首页>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;边栏推荐
- es常用语法一
- Select tag - uses the default text as a placeholder prompt but is not considered a valid value
- Basic configuration and test of Beifu twincat3 NCI in NC axis interface
- Beifu PLC based on NT_ Shutdown to realize automatic shutdown and restart of controller
- 7.Consul服务注册与发现
- Zero basics of C language lesson 7: break & continue
- 7-2 the cubic root of a number
- 微信小程序注册指引
- Custom encapsulation drop-down component
- LeetCode_ Stack_ Medium_ 150. evaluation of inverse Polish expression
猜你喜欢

Calculate the distance between two points (2D, 3D)

Detailed introduction to shell script (4)

Mysql database explanation (III)
![[how to connect the network] Chapter 2 (middle): sending a network packet](/img/5f/602c59d3a7ee1154c7410fb2fcfc41.png)
[how to connect the network] Chapter 2 (middle): sending a network packet

Tips for using nexys A7 development board resources

Basic methods for network diagnosis and hardware troubleshooting of Beifu EtherCAT module

Es6: iterator

Beifu PLC obtains system time, local time, current time zone and system time zone conversion through program

Guruiwat rushed to the Hong Kong stock exchange for listing: set "multiple firsts" and obtained an investment of 900million yuan from IDG capital
![[how to connect the network] Chapter 2 (Part 1): establish a connection, transmit data, and disconnect](/img/e3/a666ba2f48e8edcc7db80503a6156d.png)
[how to connect the network] Chapter 2 (Part 1): establish a connection, transmit data, and disconnect
随机推荐
Update and download of Beifu EtherCAT XML description file
Wechat applet SetData dynamic variable value sorting
character constants
Beifu PLC model selection -- how to see whether the motor is a multi turn absolute value encoder or a single turn absolute value encoder
7-16 monetary system I
网络远程访问的方式使用树莓派
2021-10-18 character array
GC is not used in D
MySQL数据库讲解(三)
李航老师新作《机器学习方法》上市了!附购买链接
7-1 range of numbers
NVM installation tutorial
7-2 picking peanuts
MongoDB系列之Window环境部署配置
d的is表达式
Nexys A7开发板资源使用技巧
Sed editor
Detailed sorting of HW blue team traceability process
Generation and rendering of VTK cylinder
Thinking caused by the error < note: candidate expectations 1 argument, 0 provided >