MySQL session temporary tablespace
1. Physical file [root@roidb1 data] # cd\ # innodb_temp/ [root @ roidb1 # innodb_temp] # ls-lhtotal 160K Murray RW Murray. 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, temporary tablespace directory mysql > show variables like 'innodb_temp_tablespaces_dir' +-- +-+ | Variable_name | Value | +-- +-+ | innodb_temp_tablespaces _ dir |. / # innodb_temp/ | +-- +-+ 1 row in set (0.00 sec) uses the new version MySQL8.0.18 There are many things that are very different from 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. Description: defines the location where the temporary tablespace pool is created. The default location is the # innodb_temp directory. 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. Note: since the MySQL8.0.16 version, the session temporary tablespace always stores the creation of user temporary tables and internal temporary tables.