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

MySQL 8.4 参考手册 · 中文镜像

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

打开官方英文原文 ↗

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

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

28.4.27 INFORMATION_SCHEMA INNODB_TEMP_TABLE_INFO 表28.4.27 The INFORMATION_SCHEMA INNODB_TEMP_TABLE_INFO Table

INNODB_TEMP_TABLE_INFO 表提供有关用户创建的、在 InnoDB 实例中处于活动状态的 InnoDB 临时表的信息。它不提供优化器使用的内部 InnoDB 临时表的信息。INNODB_TEMP_TABLE_INFO 表在首次查询时创建,仅存在于内存中,并不会持久化到磁盘。The INNODB_TEMP_TABLE_INFO table provides information about user-created InnoDB temporary tables that are active in an InnoDB instance. It does not provide information about internal InnoDB temporary tables used by the optimizer. The INNODB_TEMP_TABLE_INFO table is created when first queried, exists only in memory, and is not persisted to disk.

有关使用信息和示例,请参见 第 17.15.7 节,“InnoDB INFORMATION_SCHEMA 临时表信息表”。For usage information and examples, see Section 17.15.7, “InnoDB INFORMATION_SCHEMA Temporary Table Info Table”.

INNODB_TEMP_TABLE_INFO 表具有以下列:The INNODB_TEMP_TABLE_INFO table has these columns:

  • TABLE_ID

    临时表的表 ID。The table ID of the temporary table.

  • NAMENAME

    临时表的名称。The name of the temporary table.

  • N_COLS

    临时表中的列数。此数量包括 InnoDB 创建的三列隐藏列(DB_ROW_ID、DB_TRX_ID 和 DB_ROLL_PTR)。The number of columns in the temporary table. The number includes three hidden columns created by InnoDB (DB_ROW_ID, DB_TRX_ID, and DB_ROLL_PTR).

  • SPACE

    临时表所在的临时表空间 ID。The ID of the temporary tablespace where the temporary table resides.

示例Example

mysql> CREATE TEMPORARY TABLE t1 (c1 INT PRIMARY KEY) ENGINE=INNODB;

mysql> SELECT * FROM INFORMATION_SCHEMA.INNODB_TEMP_TABLE_INFO\G
*************************** 1. row ***************************
TABLE_ID: 97
    NAME: #sql8c88_43_0
  N_COLS: 4
   SPACE: 76

注释Notes

  • 此表主要用于专家级监控。This table is useful primarily for expert-level monitoring.

  • 你必须拥有 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.