设为首页 加入收藏

TOP

Can't create/write to file '/tmp/MLjnvU95' (Errcode: 13 - Permission denied)(二)
2019-09-17 16:02:05 】 浏览:28
Tags:Can' create/write file ' /tmp/MLjnvU95' Errcode: Permission denied
as the original table.

 

Online DDL operations may use temporary log files for recording concurrent DML, temporary sort files when creating an index, and temporary intermediate tables files when rebuilding the table. For more information, see Section 15.12.3, “Online DDL Space Requirements”.

 

InnoDB user-created temporary tables and on-disk internal temporary tables are created in a temporary tablespace file named ibtmp1 in the MySQL data directory. For more information, see Section 15.6.3.5, “Temporary Tablespaces”.

 

 

 

MySQL会以隐含方式创建所有的临时文件。这样,就能确保中止mysqld时会删除所有临时文件。使用隐含文件的缺点在于,在临时文件目录所在的位置中,看不到占用了文件系统的大临时文件。

 

进行排序时(ORDER BYGROUP BY),MySQL通常会使用1个或多个临时文件。所需的最大磁盘空间由下述表达式决定:

 

(length of what is sorted + sizeof(row pointer))

 

* number of matched rows

 

* 2

 

row pointer(行指针)的大小通常是4字节,但在以后,对于大的表,该值可能会增加。

 

对于某些SELECT查询,MySQL还会创建临时SQL表。它们不是隐含表,并具有SQL_*形式的名称。

 

ALTER TABLE会在与原始表目录相同的目录下创建临时表。

 

如果内存临时表超出了限制,MySQL就会自动地把它转化为基于磁盘的MyISAM表,存储在指定的tmpdir目录下。

 

 

 

 

 

参考资料:

 

https://dev.mysql.com/doc/refman/8.0/en/temporary-files.html

首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Elasticsearch?alias别名管理小结 下一篇MYSQL数据库培训NAVIGATE的使用和..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目