content_image/700534.jpg content_image/700535.jpg content_image/700536.jpg
3. Query the INNODB_FT_INDEX_CACHE  table, which shows information about newly inserted rows in a FULLTEXT  index. To avoid expensive index reorganization during DML operations, data for newly inserted rows remains in the FULLTEXT  index cache until OPTIMIZE TABLE  is run (or until the server is shut down or cache limits are exceeded). 

mysql> SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE LIMIT 5; 

<img src='content_image/700534.jpg'>

4. Enable the innodb_optimize_fulltext_only  system variable and run OPTIMIZE TABLE  on the table that contains the FULLTEXT  index. This operation flushes the contents of the FULLTEXT  index cache to the main FULLTEXT  index. innodb_optimize_fulltext_only  changes the way the OPTIMIZE TABLE  statement operates on InnoDB  tables, and is intended to be enabled temporarily, during maintenance operations on InnoDB  tables with FULLTEXT  indexes. 

mysql> SET GLOBAL innodb_optimize_fulltext_only=ON; mysql> OPTIMIZE TABLE articles; 

<img src='content_image/700535.jpg'>

5. Query the INNODB_FT_INDEX_TABLE  table to view information about data in the main FULLTEXT index, including information about the data that was just flushed from the FULLTEXT  index cache. 

mysql> SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE LIMIT 5; 

<img src='content_image/700536.jpg'>

The INNODB_FT_INDEX_CACHE  table is now empty since the OPTIMIZE TABLE  operation flushed the FULLTEXT  index cache. 

mysql> SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE LIMIT 5; Empty set (0.00 sec) 

6. Delete some records from the test/articles  table. 

mysql> DELETE FROM test.articles WHERE id < 4; 

7. Query the INNODB_FT_DELETED  table. This table records rows that are deleted from the FULLTEXT index. To avoid expensive index reorganization during DML operations, information about newly deleted records is stored separately, filtered out of search results when you do a text search, and removed from the main search index when you run OPTIMIZE TABLE . 

mysql> SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_DELETED; 

+--------+ | DOC_ID | 

