myisam_ftdump displays information about myisam_ftdump显示FULLTEXT
indexes in MyISAM
tables. 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 在使用myisam_ftdump之前,如果服务器正在运行,请确保首先发出FLUSH TABLES
statement first if the server is running.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支持以下选项:
--help
, -h
-?
Display a help message and exit.显示帮助消息并退出。
--count
, -c
Calculate per-word statistics (counts and global weights).计算每个单词的统计数据(计数和全局权重)。
--dump
, -d
Dump the index, including data offsets and word weights.转储索引,包括数据偏移量和字权重。
--length
, -l
Report the length distribution.报告长度分布。
--stats
, -s
Report global index statistics. This is the default operation if no other operation is specified.报告全球指数统计数据。如果没有指定其他操作,则这是默认操作。
--verbose
, -v
Verbose mode. Print more output about what the program does.详细模式。打印更多关于程序功能的输出。