Why does MySQL produce so many temporary MYD files?
http://dba.stackexchange.com/questions/30505/why-does-mysql-produce-so-many-temporary-myd-files
On a Debian Linux server, hosting many PHP/MySQL websites (photo galleries), sometimes I have "many" files like For example today :
(59 files at the same time, for more than 6GB... yes I monitor big files in /tmp) Unfortunately, All the file names follow the
|
|||||||||
migrated from stackoverflow.com Dec 16 '12 at 2:08This question came from our site for professional and enthusiast programmers. |
|||||||||
|
There are some options that can cause temp tables to materialize as Here are the options:
You should also consider the MySQL Documentation on Internal Temp Table Usage The situations where in-memory temp tables are made are
When an in-memory temp table exceeded the minimum of (tmp_table_size or max_heap_table_size), mysqld does the following:
The situations where in-memory temp tables are bypassed in favor of disk are
Some due diligence is required to reduce temp table creation on disk
If after such due diligence, there are still temp tables being formed Here is a quick-and-dirty way to set up a 16GB RAM Disk using tmpdir STEP01) Create RAM Disk Folder
STEP02) Add this to
STEP03) Add this to /etc/fstab
STEP04) Reload /etc/fstab
STEP05) After this, all temp table that become MyISAM are written to the RAM Disk. This should speed disk-based temp table creation. Give it a Try !!! |
|||
These are queries that are rolling over onto disk because the results are too large for memory. When the query is done, the space clears. There's no way to match these temp files definitively to queries, but |
|||
Whenever we use alter statements on table It creates the Alter on tables make MySQL to copy whole data into temporary files Also for some kinda sorting queries it creates temporary files. As I traced out. This thing happens. |
|||
Your Answer
最新文章
- SSH项目里面 忘记密码的邮件发送功能
- MySQL pdo预处理能防止sql注入的原因
- Qt 环境下的activex控件编程-------1
- Windows 上使用 cygwin 连接到 docker toolbox
- 软件测试技术(五)——Software Review
- Linux 学习笔记 文件权限
- Logstash conf.d 多个配置文件
- java带图片的邮件发送方法实现
- 使用HAProxy、PHP、Redis和MySQL支撑每周10亿请求
- PHP入门,clone和__clone
- Java经典编程题50道之二十七
- HashMap和Hashtable的异同点
- 20190211 模拟训练 A. 大猫咪
- Spring再接触 Annotation part1
- python with as 的用法
- 检测Android手机的IP地址
- 【转载】基于MFC的ActiveX控件开发(2)
- 关于zip伪加密
- HDU 1999 不可摸数 (模拟)
- Mimiktaz抓取本机密码
热门文章
- bzoj 1753: [Usaco2005 qua]Who's in the Middle【排序】
- [ZJOI2006]Book书架
- BFS POJ 2251 Dungeon Master
- 关于ds添加datarow
- (转)全文检索技术学习(二)——配置Lucene的开发环境
- acedssget F 方式
- ThinkPHP---rbac权限管理
- java的标识符和关键词
- react-router 4.x 路由按需加载
- 【计算几何】二维凸包——Graham's Scan法