当前位置:网站首页>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
边栏推荐
- DSPE-PEG-Azide DSPE-PED-N3 磷脂-聚乙二醇-叠氮脂质PFG
- MW:3400 4-Arm PEG-DSPE 四臂-聚乙二醇-磷脂一种饱和的18碳磷脂
- Cholesterol-PEG-Amine CLS-PEG-NH2 胆固醇-聚乙二醇-氨基科研用
- Cholesterol-PEG-Acid CLS-PEG-COOH 胆固醇-聚乙二醇-羧基修饰肽类化合物
- 计算图像数据集均值和方差
- DSPE-PEG-Biotin,CAS:385437-57-0,磷脂-聚乙二醇-生物素可延长循环半衰期
- 为数学而歌之伯努利家族
- mPEG-DMPE Methoxy-polyethylene glycol-bismyristyl phosphatidylethanolamine for stealth liposome formation
- 浏览器查找js绑定或者监听的事件
- opencv之图像二值化处理
猜你喜欢

Principle analysis of famous website msdn.itellyou.cn

CAS:1403744-37-5 DSPE-PEG-FA 科研实验用磷脂-聚乙二醇-叶酸

2021年软件测试面试题大全

box-shadow相关属性

Embedding前沿了解

VS connects to MYSQL through ODBC (2)

Phospholipids-Polyethylene Glycol-Active Esters for Scientific Research DSPE-PEG-NHS CAS: 1445723-73-8

pytorch模型微调finetuning训练image_dog(kaggle)

2021-09-30

Cholesterol-PEG-Thiol CLS-PEG-SH 胆固醇-聚乙二醇-巯基
随机推荐
Phospholipids-Polyethylene Glycol-Active Esters for Scientific Research DSPE-PEG-NHS CAS: 1445723-73-8
MW:3400 4-Arm PEG-DSPE 四臂-聚乙二醇-磷脂一种饱和的18碳磷脂
如何修改数据库密码
Cholesterol-PEG-Thiol CLS-PEG-SH Cholesterol-Polyethylene Glycol-Sulfhydryl
ERROR Error: No module factory availabl at Object.PROJECT_CONFIG_JSON_NOT_VALID_OR_NOT_EXIST ‘Error
应用usb_cam同时打开多个摄像头方法
After unicloud is released, the applet prompts that the connection to the local debugging service failed. Please check whether the client and the host are under the same local area network.
wangeditor富文本编辑器上传图片以及跨域问题解决
CAS: 1403744-37-5 DSPE-PEG-FA Phospholipid-Polyethylene Glycol-Folic Acid for Scientific Research
qt:cannot open C:\Users\某某某\AppData\Local\Temp\main.obj.15576.16.jom for write
Hyperparameter Optimization - Excerpt
Cholesterol-PEG-Amine CLS-PEG-NH2 Cholesterol-Polyethylene Glycol-Amino Research Use
CNN的一点理解
Understanding of js arrays
YOLOX中的SimOTA
Global scope and function scope in js
ROS 之订阅多个topic时间同步问题
VS2017连接MYSQL
Shell/Vim related list
Session和Cookie,Token