INNODB_TABLESPACES_BRIEF 表提供 file-per-table、general、undo 和 system 表空间的空间 ID、名称、路径、标志和空间类型元数据。The INNODB_TABLESPACES_BRIEF table
provides space ID, name, path, flag, and space type metadata for
file-per-table, general, undo, and system tablespaces.
INNODB_TABLESPACES 提供相同的元数据,但加载速度较慢,因为表提供的其他元数据,例如 FS_BLOCK_SIZE、FILE_SIZE 和 ALLOCATED_SIZE,必须动态加载。INNODB_TABLESPACES provides the same
metadata but loads more slowly because other metadata provided by
the table, such as FS_BLOCK_SIZE,
FILE_SIZE, and
ALLOCATED_SIZE, must be loaded dynamically.
空间和路径元数据也由 INNODB_DATAFILES 表提供。Space and path metadata is also provided by the
INNODB_DATAFILES table.
INNODB_TABLESPACES_BRIEF 表具有以下列:The INNODB_TABLESPACES_BRIEF table
has these columns:
SPACE表空间 ID。The tablespace ID.
NAMENAME表空间名称。对于每表一个文件的表空间,名称的形式为
schema/table_name。The tablespace name. For file-per-table tablespaces, the name is in the form ofschema/table_name.PATHPATH表空间数据文件路径。如果在 MySQL 数据目录之外的某个位置创建了按表存储文件(file-per-table)表空间,则路径值为完整的目录路径。否则,路径相对于数据目录。The tablespace data file path. If a file-per-table tablespace is created in a location outside the MySQL data directory, the path value is a fully qualified directory path. Otherwise, the path is relative to the data directory.
FLAG表示表空间格式和存储特性的位级信息的数值。A numeric value that represents bit-level information about tablespace format and storage characteristics.
SPACE_TYPE表空间的类型。可能的值包括
General用于InnoDB通用表空间,Single用于InnoDB每表文件表空间,以及System用于InnoDB系统表空间。The type of tablespace. Possible values includeGeneralforInnoDBgeneral tablespaces,SingleforInnoDBfile-per-table tablespaces, andSystemfor theInnoDBsystem tablespace.
示例Example
mysql> SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_BRIEF WHERE SPACE = 7;
+-------+---------+---------------+-------+------------+
| SPACE | NAME | PATH | FLAG | SPACE_TYPE |
+-------+---------+---------------+-------+------------+
| 7 | test/t1 | ./test/t1.ibd | 16417 | Single |
+-------+---------+---------------+-------+------------+
注意事项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.