当前位置:网站首页>Solution for MySQL The table is full
Solution for MySQL The table is full
2022-07-31 06:23:00 【web15085599741】
The size of the memory table exceeds the specified range
MySQL has the problem of "the table is full", generally for two reasons:
One, need to increase the size of the data table
vi /etc/my.cnfYou need to modify the MySQL configuration file my.cnf, add/modify two lines under [mysqld]:
tmp_table_size = 1024Mmax_heap_table_size = 1024MThe system default is 16M, restart mySQL after modification
Second, the hard disk space of the server is full, just clean up the garbage/useless data
#Query server space usagedf -hQuery MySQL storage directory storage usage
#Query the size of all files in a specific directorydu -sh /usr/data/*tmp_table_size
Memory cache size of temporary table
(Temporary table refers to the temporary data table generated when sql is executed)
# tmp_table_sizeDefault value 16777216Minimum 1Maximum 18446744073709551615// The unit byte default value is more than 16MView tmp_table_sizeshow global variables like 'tmp_table_size';
Set tmp_table_sizeset global tmp_table_size= 1073741824; (effective immediately after restart)
Add tmp_table_size under mysqld in the MySQL configuration file my.cnf[mysqld]tmp_table_size = 100000000
First of all, when optimizing SQL, you should try to avoid temporary tables
If you must use temporary tables and execute a large number of SQL at the same time to generate a large number of temporary tables, increase tmp_table_size appropriately
If the amount of data generated in the temporary table is greater than tmp_table_size, thenStore temporary tables on disk instead of memory
Note
[max_heap_table_size in MySQL
](https://link.jianshu.com/t=https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_max_heap_table_size) parameter also affectsThe memory cache size of the temporary table max_heap_table_size is the table size of the MEMORY memory engine because the temporary table is also a memory table, so it is also limited by this parameter, so if you want to increase the The size of tmp_table_size also needs to increase the size of max_heap_table_size
You can analyze whether you need to increase tmp_table_size
Created_tmp_disk_tables and Created_tmp_tablesView Statusshow global status like 'Created_tmp_disk_tables';show global status like 'Created_tmp_tables';Created_tmp_disk_tables : number of disk temporary tablesCreated_tmp_tables : the number of in-memory temporary tablesMySQL5.7 Reference Manual - tmp_table_size
Related articles on MySQL memory allocation
http://mysql.rjweb.org/doc.php/memory
My Personal Blog
https://blog.52ipc.top/p>
Let me introduce myself first. The editor graduated from Shanghai Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Alibaba in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials
边栏推荐
- Flutter mixed development module dependencies
- Research reagents Cholesterol-PEG-Maleimide, CLS-PEG-MAL, Cholesterol-PEG-Maleimide
- YOLOX中的SimOTA
- 2021-09-30
- 活体检测PatchNet学习笔记
- wangeditor编辑器内容传至后台服务器存储
- 使用 OpenCV 提取图像的 HOG、SURF 及 LBP 特征 (含代码)
- Tensorflow related list
- Xiaomi mobile phone SMS location service activation failed
- MySQL master-slave switching steps
猜你喜欢

科学研究用磷脂-聚乙二醇-活性酯 DSPE-PEG-NHS CAS:1445723-73-8

softmax函数详解

mPEG-DSPE 178744-28-0 甲氧基-聚乙二醇-磷脂酰乙醇胺线性PEG磷脂

CAS: 1403744-37-5 DSPE-PEG-FA Phospholipid-Polyethylene Glycol-Folic Acid for Scientific Research

The browser looks for events bound or listened to by js

二进制转换成十六进制、位运算、结构体

Cholesterol-PEG-Amine CLS-PEG-NH2 Cholesterol-Polyethylene Glycol-Amino Research Use

VS2017连接MYSQL

Sourcery插件(自动提升代码质量)

WeChat applet source code acquisition and decompilation method
随机推荐
Pytorch学习笔记09——多分类问题
超参数优化-摘抄
自然语言处理相关list
MYSQL事务与锁问题处理
Fluorescein-PEG-DSPE 磷脂-聚乙二醇-荧光素荧光磷脂PEG衍生物
变分自编码器VAE实现MNIST数据集生成by Pytorch
Embedding cutting-edge understanding
钉钉H5微应用免登鉴权
Tensorflow相关list
Web Screenshots and Reverse Proxy
Markdown help documentation
浏览器中的画中画(Picture-in-Picture)API
DSPE-PEG-Biotin, CAS: 385437-57-0, phospholipid-polyethylene glycol-biotin prolongs circulating half-life
DSPE-PEG-Azide DSPE-PED-N3 磷脂-聚乙二醇-叠氮脂质PFG
Pytorch每日一练——预测泰坦尼克号船上的生存乘客
DSPE-PEG-Biotin,CAS:385437-57-0,磷脂-聚乙二醇-生物素可延长循环半衰期
cv2.resize()是反的
Tensorflow——demo
CAS: 1403744-37-5 DSPE-PEG-FA Phospholipid-Polyethylene Glycol-Folic Acid for Scientific Research
crontab的定时操作