In addition to storing metadata about database objects in the data dictionary, MySQL stores it in serialized form. 除了在数据字典中存储关于数据库对象的元数据外,MySQL还以序列化形式存储它。This data is referred to as serialized dictionary information (SDI). 此数据称为序列化字典信息(SDI)。InnoDB
stores SDI data within its tablespace files. InnoDB
将SDI数据存储在其表空间文件中。NDBCLUSTER
stores SDI data in the NDB dictionary. NDBCLUSTER
将SDI数据存储在NDB字典中。Other storage engines store SDI data in 其他存储引擎在为表的数据库目录中的给定表创建的.sdi
files that are created for a given table in the table's database directory. .sdi
文件中存储SDI数据。SDI data is generated in a compact SDI数据以紧凑的JSON
format.JSON
格式生成。
Serialized dictionary information (SDI) is present in all 序列化字典信息(SDI)存在于所有InnoDB
tablespace files except for temporary tablespace and undo tablespace files. InnoDB
表空间文件中,但临时表空间和撤消表空间文件除外。SDI records in an InnoDB
tablespace file only describe table and tablespace objects contained within the tablespace.InnoDB
表空间文件中的SDI记录仅描述表空间中包含的表和表空间对象。
SDI data is updated by DDL operations on a table or SDI数据通过表上的DDL操作或者说通过表或CHECK TABLE FOR UPGRADE
. CHECK TABLE FOR UPGRADE
进行更新。SDI data is not updated when the MySQL server is upgraded to a new release or version.当MySQL服务器升级到新版本或版本时,SDI数据不会更新。
The presence of SDI data provides metadata redundancy. SDI数据的存在提供了元数据冗余。For example, if the data dictionary becomes unavailable, object metadata can be extracted directly from 例如,如果数据字典变得不可用,则可以使用ibd2sdi工具直接从InnoDB
tablespace files using the ibd2sdi tool.InnoDB
表空间文件提取对象元数据。
For 对于InnoDB
, an SDI record requires a single index page, which is 16KB in size by default. InnoDB
,SDI记录需要一个索引页,默认为16KB。However, SDI data is compressed to reduce the storage footprint.但是,SDI数据被压缩以减少存储占用空间。
For partitioned 对于由多个表空间组成的分区InnoDB
tables comprised of multiple tablespaces, SDI data is stored in the tablespace file of the first partition.InnoDB
表,SDI数据存储在第一个分区的表空间文件中。
The MySQL server uses an internal API that is accessed during DDL operations to create and maintain SDI records.MySQL服务器使用在DDL操作期间访问的内部API来创建和维护SDI记录。
The IMPORT TABLE
statement imports MyISAM
tables based on information contained in .sdi
files. IMPORT TABL
E语句根据.sdi
文件中包含的信息导入MyISAM
表。For more information, see Section 13.2.5, “IMPORT TABLE Statement”.有关更多信息,请参阅第13.2.5节,“IMPORT TABLE语句”。