溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

MySQL會話臨時表空間有什么作用

發(fā)布時間:2020-05-25 11:45:31 來源:網(wǎng)絡 閱讀:232 作者:三月 欄目:MySQL數(shù)據(jù)庫

本文主要給大家介紹MySQL會話臨時表空間有什么作用,文章內(nèi)容都是筆者用心摘選和編輯的,具有一定的針對性,對大家的參考意義還是比較大的,下面跟筆者一起了解下MySQL會話臨時表空間有什么作用吧。                                                          

1、物理文件
[root@roidb1 data]# cd \#innodb_temp/
[root@roidb1 #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
[root@roidb1 #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有很大的區(qū)別。
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.
說明:定義了創(chuàng)建臨時表空間池的位置。默認位置為#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版本以后,會話臨時表空間總是存儲創(chuàng)建用戶臨時表和

內(nèi)部臨時表。

看完以上關(guān)于MySQL會話臨時表空間有什么作用,很多讀者朋友肯定多少有一定的了解,如需獲取更多的行業(yè)知識信息 ,可以持續(xù)關(guān)注我們的行業(yè)資訊欄目的。

向AI問一下細節(jié)

免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI