INNODB_SESSION_TEMP_TABLESPACES 表提供有关会话临时表空间的元数据,这些表空间用于内部和用户创建的临时表。The INNODB_SESSION_TEMP_TABLESPACES
table provides metadata about session temporary tablespaces used
for internal and user-created temporary tables.
INNODB_SESSION_TEMP_TABLESPACES 表有以下列:The INNODB_SESSION_TEMP_TABLESPACES
table has these columns:
ID进程或会话 ID。The process or session ID.
SPACE表空间 ID。保留了 40 万个空间 ID 用于会话临时表空间。每次服务器启动时,会重新创建会话临时表空间。空间 ID 在服务器关闭时不会保存,并可能被重用。The tablespace ID. A range of 400 thousand space IDs is reserved for session temporary tablespaces. Session temporary tablespaces are recreated each time the server is started. Space IDs are not persisted when the server is shut down and may be reused.
PATHPATH表空间数据文件路径。会话临时表空间的文件扩展名为
ibt。The tablespace data file path. A session temporary tablespace has anibtfile extension.SIZE表空间的大小,以字节为单位。The size of the tablespace, in bytes.
STATE表空间的状态。
ACTIVE表示该表空间当前正被会话使用。INACTIVE表示该表空间在可用会话临时表空间池中。The state of the tablespace.ACTIVEindicates that the tablespace is currently used by a session.INACTIVEindicates that the tablespace is in the pool of available session temporary tablespaces.PURPOSE表空间的用途。
INTRINSIC表示该表空间用于优化器优化的内部临时表使用。SLAVE表示该表空间被分配用于在副本上存储用户创建的临时表。USER表示该表空间用于用户创建的临时表。NONE表示该表空间未被使用。The purpose of the tablespace.INTRINSICindicates that the tablespace is used for optimized internal temporary tables use by the optimizer.SLAVEindicates that the tablespace is allocated for storing user-created temporary tables on a replica.USERindicates that the tablespace is used for user-created temporary tables.NONEindicates that the tablespace is not in use.
示例Example
mysql> SELECT * FROM INFORMATION_SCHEMA.INNODB_SESSION_TEMP_TABLESPACES;
+----+------------+----------------------------+-------+----------+-----------+
| ID | SPACE | PATH | SIZE | STATE | PURPOSE |
+----+------------+----------------------------+-------+----------+-----------+
| 8 | 4294566162 | ./#innodb_temp/temp_10.ibt | 81920 | ACTIVE | INTRINSIC |
| 8 | 4294566161 | ./#innodb_temp/temp_9.ibt | 98304 | ACTIVE | USER |
| 0 | 4294566153 | ./#innodb_temp/temp_1.ibt | 81920 | INACTIVE | NONE |
| 0 | 4294566154 | ./#innodb_temp/temp_2.ibt | 81920 | INACTIVE | NONE |
| 0 | 4294566155 | ./#innodb_temp/temp_3.ibt | 81920 | INACTIVE | NONE |
| 0 | 4294566156 | ./#innodb_temp/temp_4.ibt | 81920 | INACTIVE | NONE |
| 0 | 4294566157 | ./#innodb_temp/temp_5.ibt | 81920 | INACTIVE | NONE |
| 0 | 4294566158 | ./#innodb_temp/temp_6.ibt | 81920 | INACTIVE | NONE |
| 0 | 4294566159 | ./#innodb_temp/temp_7.ibt | 81920 | INACTIVE | NONE |
| 0 | 4294566160 | ./#innodb_temp/temp_8.ibt | 81920 | INACTIVE | NONE |
+----+------------+----------------------------+-------+----------+-----------+
备注Notes
你必须拥有
PROCESS权限才能查询此表。You must have thePROCESSprivilege to query this table.使用
INFORMATION_SCHEMACOLUMNS表或SHOW COLUMNS语句查看关于此表列的更多信息,包括数据类型和默认值。Use theINFORMATION_SCHEMACOLUMNStable or theSHOW COLUMNSstatement to view additional information about the columns of this table, including data types and default values.