4.6.3 myisam_ftdump — Display Full-Text Index information显示全文索引信息

myisam_ftdump displays information about FULLTEXT indexes in MyISAM tables. myisam_ftdump显示MyISAM表中FULLTEXT索引的信息。It reads the MyISAM index file directly, so it must be run on the server host where the table is located. 它直接读取MyISAM索引文件,因此必须在表所在的服务器主机上运行。Before using myisam_ftdump, be sure to issue a FLUSH TABLES statement first if the server is running.在使用myisam_ftdump之前,如果服务器正在运行,请确保首先发出FLUSH TABLES语句。

myisam_ftdump scans and dumps the entire index, which is not particularly fast. On the other hand, the distribution of words changes infrequently, so it need not be run often.myisam_ftdump扫描并转储整个索引,这不是特别快。另一方面,单词的分布变化不频繁,因此不需要经常运行。

Invoke myisam_ftdump like this:像这样调用myisam_ftdump

myisam_ftdump [options] tbl_name index_num

The tbl_name argument should be the name of a MyISAM table. tbl_name参数应该是MyISAM表的名称。You can also specify a table by naming its index file (the file with the .MYI suffix). 您还可以通过命名表的索引文件(后缀为.MYI的文件)来指定表。If you do not invoke myisam_ftdump in the directory where the table files are located, the table or index file name must be preceded by the path name to the table's database directory. Index numbers begin with 0.如果不在表文件所在的目录中调用myisam_ftdump,则表或索引文件名前面必须加上表数据库目录的路径名。索引号以0开头。

Example: Suppose that the test database contains a table named mytexttable that has the following definition:示例:假设test数据库包含一个名为mytexttable的表,该表具有以下定义:

CREATE TABLE mytexttable
(
  id   INT NOT NULL,
  txt  TEXT NOT NULL,
  PRIMARY KEY (id),
  FULLTEXT (txt)
) ENGINE=MyISAM;

The index on id is index 0 and the FULLTEXT index on txt is index 1. id上的索引是索引0,txt上的FULLTEXT索引是索引1。If your working directory is the test database directory, invoke myisam_ftdump as follows:如果您的工作目录是test数据库目录,请按如下方式调用myisam_ftdump

myisam_ftdump mytexttable 1

If the path name to the test database directory is /usr/local/mysql/data/test, you can also specify the table name argument using that path name. 如果test数据库目录的路径名为/usr/local/mysql/data/test,您还可以使用该路径名指定表名参数。This is useful if you do not invoke myisam_ftdump in the database directory:如果您不在数据库目录中调用myisam_ftdump,这将非常有用:

myisam_ftdump /usr/local/mysql/data/test/mytexttable 1

You can use myisam_ftdump to generate a list of index entries in order of frequency of occurrence like this on Unix-like systems:在类Unix系统中,您可以使用myisam_ftdump按出现频率顺序生成索引条目列表,如下所示:

myisam_ftdump -c mytexttable 1 | sort -r

On Windows, use:在Windows上,使用:

myisam_ftdump -c mytexttable 1 | sort /R

myisam_ftdump supports the following options:myisam_ftdump支持以下选项: