List Full Text Indexes in MySQL

Been a while since mylast post. Anyhow, recently we needed to change the minimum word length for MySQL Full Text Searches and then rebuild all our full text indexes, which requires doing a quick repair on any relevant tables.

I knew it was a lot of tables, so I came up with a quick query to list all the tables with full text indexes:

select DISTINCT TABLE_SCHEMA, TABLE_NAME
from information_schema.STATISTICS
where INDEX_TYPE = ‘FULLTEXT’;

You could also change the query to list out the relevant REPAIR commands.

select DISTINCT
CONCAT(‘repair table ‘,
TABLE_SCHEMA, ‘.’, TABLE_NAME,
‘ quick;’)
from information_schema.STATISTICS
where INDEX_TYPE = ‘FULLTEXT’;

0