myisam_ftdump is a utility for displaying information about MyISAM FULLTEXT indexes. It will scan and dump the entire index, and can be a lengthy process.

If the server is running, make sure you run a FLUSH TABLES statement first.


myisam_ftdump <table_name> <index_num>

The table_name can be specified with or without the .MYI index extension.

The index number refers to the number of the index when the table was defined, starting at zero. For example, take the following table definition:

CREATE TABLE IF NOT EXISTS `employees_example` (
  `first_name` varchar(30) NOT NULL,
  `last_name` varchar(40) NOT NULL,
  `position` varchar(25) NOT NULL,
  `home_address` varchar(50) NOT NULL,
  `home_phone` varchar(12) NOT NULL,
  `employee_code` varchar(25) NOT NULL,
  `bio` text NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `employee_code` (`employee_code`),
  FULLTEXT (`bio`)

The fulltext index will be 2. The primary key is index 0, and the unique key index 1.

You can use myisam_ftdump to generate a list of index entries in order of frequency of occurrence as follows:

myisam_ftdump -c mytexttable 1 | sort -r


-h, --helpDisplay help and exit.
-?, --helpSynonym for -h.
-c, --countCalculate per-word stats (counts and global weights).
-d, --dumpDump index (incl. data offsets and word weights).
-l, --lengthReport length distribution.
-s, --statsReport global stats.
-v, --verboseBe verbose.


Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.