INNODB_FT_DELETED 表存储从 InnoDB 表的 FULLTEXT 索引中删除的行。为了在对 InnoDB FULLTEXT 索引进行 DML 操作时避免昂贵的索引重组,新增删除单词的信息会单独存储,在文本搜索时被从搜索结果中过滤,并且仅在你对该 InnoDB 表执行 OPTIMIZE TABLE 语句时才从主搜索索引中移除。更多信息,请参阅 优化 InnoDB 全文索引。The INNODB_FT_DELETED table stores
rows that are deleted from the FULLTEXT index
for an InnoDB table. To avoid expensive index
reorganization during DML operations for an
InnoDB FULLTEXT index, the
information about newly deleted words is stored separately,
filtered out of search results when you do a text search, and
removed from the main search index only when you issue an
OPTIMIZE TABLE statement for the
InnoDB table. For more information, see
Optimizing InnoDB Full-Text Indexes.
此表最初为空。在查询它之前,将 innodb_ft_aux_table 系统变量的值设置为包含 FULLTEXT 索引的表的名称(包括数据库名称)(例如,test/articles)。This table is empty initially. Before querying it, set the value
of the innodb_ft_aux_table system
variable to the name (including the database name) of the table
that contains the FULLTEXT index (for example,
test/articles).
有关相关的使用信息和示例,请参见 第 17.15.4 节,“InnoDB INFORMATION_SCHEMA FULLTEXT 索引表”。For related usage information and examples, see Section 17.15.4, “InnoDB INFORMATION_SCHEMA FULLTEXT Index Tables”.
INNODB_FT_DELETED 表有这些列:The INNODB_FT_DELETED table has these
columns:
DOC_ID新删除行的文档 ID。此值可能反映您为底层表定义的 ID 列的值,或者当表中没有合适的列时,它可以是
InnoDB生成的序列值。当执行文本搜索时使用此值,以便在通过INNODB_FT_INDEX_TABLE表跳过已删除行的数据在通过OPTIMIZE TABLE语句从FULLTEXT索引中物理删除之前的行。有关更多信息,请参阅 优化 InnoDB 全文索引。The document ID of the newly deleted row. This value might reflect the value of an ID column that you defined for the underlying table, or it can be a sequence value generated byInnoDBwhen the table contains no suitable column. This value is used when you perform text searches, to skip rows in theINNODB_FT_INDEX_TABLEtable before data for deleted rows is physically removed from theFULLTEXTindex by anOPTIMIZE TABLEstatement. For more information, see Optimizing InnoDB Full-Text Indexes.
例子Example
mysql> SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_DELETED;
+--------+
| DOC_ID |
+--------+
| 6 |
| 7 |
| 8 |
+--------+
注释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.有关
InnoDBFULLTEXT搜索的更多信息,请参见 第 17.6.2.4 节,“InnoDB 全文索引”,以及 第 14.9 节,“全文搜索函数”。For more information aboutInnoDBFULLTEXTsearch, see Section 17.6.2.4, “InnoDB Full-Text Indexes”, and Section 14.9, “Full-Text Search Functions”.