Documentation Home
MySQL 8.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 34.7Mb
PDF (A4) - 34.7Mb
PDF (RPM) - 32.6Mb
HTML Download (TGZ) - 8.2Mb
HTML Download (Zip) - 8.3Mb
HTML Download (RPM) - 7.1Mb
Man Pages (TGZ) - 129.9Kb
Man Pages (Zip) - 185.4Kb
Info (Gzip) - 3.2Mb
Info (Zip) - 3.2Mb

MySQL 8.0 Reference Manual  /  ...  /  The INFORMATION_SCHEMA INNODB_FT_INDEX_TABLE Table

Pre-General Availability Draft: 2018-01-12


The INNODB_FT_INDEX_TABLE table displays information about the inverted index used to process text searches against the FULLTEXT index of an InnoDB table.

For related usage information and examples, see Section 15.14.4, “InnoDB INFORMATION_SCHEMA FULLTEXT Index Tables”.

Before you query this table, set the configuration variable innodb_ft_aux_table to the name (including the database name) of the table that contains the FULLTEXT index, for example test/articles.

Table 25.13 INNODB_FT_INDEX_TABLE Columns

Column nameDescription
WORDA word extracted from the text of the columns that are part of a FULLTEXT.
FIRST_DOC_IDThe first document ID that this word appears in the FULLTEXT index.
LAST_DOC_IDThe last document ID that this word appears in the FULLTEXT index.
DOC_COUNTThe number of rows this word appears in the FULLTEXT index. The same word can occur several times within the cache table, once for each combination of DOC_ID and POSITION values.
DOC_IDThe document ID of the row containing the word. 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 by InnoDB when the table does not contain a suitable column.
POSITIONThe position of this particular instance of the word within the relevant document identified by the DOC_ID value.


  • This table initially appears empty, until you set the value of the configuration variable innodb_ft_aux_table. The following example demonstrates how to use the innodb_ft_aux_table option to show information about a FULLTEXT index for a specified table. Before information for newly inserted rows appears in INNODB_FT_INDEX_TABLE, the FULLTEXT index cache must be flushed to disk. This is accomplished by running an OPTIMIZE TABLE operation on the indexed table with innodb_optimize_fulltext_only=ON.

    mysql> use test;
    mysql> CREATE TABLE articles (
          title VARCHAR(200),
          body TEXT,
          FULLTEXT (title,body)
        ) ENGINE=InnoDB;
    mysql> INSERT INTO articles (title,body) VALUES
        ('MySQL Tutorial','DBMS stands for DataBase ...'),
        ('How To Use MySQL Well','After you went through a ...'),
        ('Optimizing MySQL','In this tutorial we will show ...'),
        ('1001 MySQL Tricks','1. Never run mysqld as root. 2. ...'),
        ('MySQL vs. YourSQL','In the following database comparison ...'),
        ('MySQL Security','When configured properly, MySQL ...');
    mysql> SET GLOBAL innodb_optimize_fulltext_only=ON;
    Query OK, 0 rows affected (0.00 sec)
    mysql> OPTIMIZE TABLE articles;
    | Table         | Op       | Msg_type | Msg_text |
    | test.articles | optimize | status   | OK       |
    mysql> SET GLOBAL innodb_ft_aux_table = 'test/articles';
    Query OK, 0 rows affected (0.00 sec)
    mysql> SELECT word, doc_count, doc_id, position FROM INNODB_FT_INDEX_TABLE LIMIT 5;
    | word       | doc_count | doc_id | position |
    | 1001       |         1 |      4 |        0 |
    | after      |         1 |      2 |       22 |
    | comparison |         1 |      5 |       44 |
    | configured |         1 |      6 |       20 |
    | database   |         2 |      1 |       31 |
  • Use DESCRIBE or SHOW COLUMNS to view additional information about the columns of this table including data types and default values.

  • You must have the PROCESS privilege to query this table.

  • For more information about InnoDB FULLTEXT search, see Section, “InnoDB FULLTEXT Indexes”, and Section 12.9, “Full-Text Search Functions”.

User Comments
Sign Up Login You must be logged in to post a comment.