mysql的临时表空间_MySQL会话临时表空间

1、物理文件

[[email protected] data]# cd \#innodb_temp/

[[email protected] #innodb_temp]# ls -lh

total 160K

-rw-r-----. 1 mysql mysql 80K Nov 22 18:58 temp_10.ibt

-rw-r-----. 1 mysql mysql 80K Nov 22 18:58 temp_1.ibt

-rw-r-----. 1 mysql mysql 80K Nov 22 18:58 temp_2.ibt

-rw-r-----. 1 mysql mysql 80K Nov 22 18:58 temp_3.ibt

-rw-r-----. 1 mysql mysql 80K Nov 22 18:58 temp_4.ibt

-rw-r-----. 1 mysql mysql 80K Nov 22 18:58 temp_5.ibt

-rw-r-----. 1 mysql mysql 80K Nov 22 18:58 temp_6.ibt

-rw-r-----. 1 mysql mysql 80K Nov 22 18:58 temp_7.ibt

-rw-r-----. 1 mysql mysql 80K Nov 22 18:58 temp_8.ibt

-rw-r-----. 1 mysql mysql 80K Nov 22 18:58 temp_9.ibt

[[email protected] #innodb_temp]#

2、临时表空间目录

mysql> show variables like ‘innodb_temp_tablespaces_dir‘;

+-----------------------------+-----------------+

| Variable_name | Value |

+-----------------------------+-----------------+

| innodb_temp_tablespaces_dir | ./#innodb_temp/ |

+-----------------------------+-----------------+

1 row in set (0.00 sec)

使用了新的版本MySQL8.0.18,有很多地方和MySQL5.7有很大的区别。

Defines the location where InnoDB creates a pool of session temporary tablespaces at startup. The default location is the #innodb_temp directory in the data directory. A fully qualified path or path relative to the data directory is permitted.

说明:定义了创建临时表空间池的位置。默认位置为#innodb_temp目录。

As of MySQL 8.0.16, session temporary tablespaces always store user-created temporary tables and internal temporary tables created by the optimizer using InnoDB. (Previously, the on-disk storage engine for internal temporary tables was determined by the internal_tmp_disk_storage_engine system variable, which is no longer supported.

说明:从MySQL8.0.16版本以后,会话临时表空间总是存储创建用户临时表和

内部临时表。

原文:https://blog.51cto.com/roidba/2452879

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值