文档首页
MySQL 8.4 参考手册
8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

正文为中文,英文原文默认隐藏。点击任意中文段落即可展开 / 收起对应英文原文。

打开官方英文原文 ↗

译文由机器翻译生成,仅供理解参考;有疑问请以官方英文原文为准。

MySQL 8.4 参考手册 / 28 个 INFORMATION_SCHEMA 表 / 28.4 INFORMATION_SCHEMA InnoDB 表 / 28.4.22 INFORMATION_SCHEMA 的 INNODB_SESSION_TEMP_TABLESPACES 表
中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 74%

28.4.22 INFORMATION_SCHEMA INNODB_SESSION_TEMP_TABLESPACES 表28.4.22 The INFORMATION_SCHEMA INNODB_SESSION_TEMP_TABLESPACES Table

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 an ibt file extension.

  • SIZE

    表空间的大小,以字节为单位。The size of the tablespace, in bytes.

  • STATE

    表空间的状态。ACTIVE 表示该表空间当前正被会话使用。INACTIVE 表示该表空间在可用会话临时表空间池中。The state of the tablespace. ACTIVE indicates that the tablespace is currently used by a session. INACTIVE indicates that the tablespace is in the pool of available session temporary tablespaces.

  • PURPOSE

    表空间的用途。INTRINSIC 表示该表空间用于优化器优化的内部临时表使用。SLAVE 表示该表空间被分配用于在副本上存储用户创建的临时表。USER 表示该表空间用于用户创建的临时表。NONE 表示该表空间未被使用。The purpose of the tablespace. INTRINSIC indicates that the tablespace is used for optimized internal temporary tables use by the optimizer. SLAVE indicates that the tablespace is allocated for storing user-created temporary tables on a replica. USER indicates that the tablespace is used for user-created temporary tables. NONE indicates 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 the PROCESS privilege to query this table.

  • 使用 INFORMATION_SCHEMA COLUMNS 表或 SHOW COLUMNS 语句查看关于此表列的更多信息,包括数据类型和默认值。Use the INFORMATION_SCHEMA COLUMNS table or the SHOW COLUMNS statement to view additional information about the columns of this table, including data types and default values.