home · blog · groups · about us · contact us
DevelopmentNow Blog
 Monday, September 24, 2007
 
 

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';

September 24, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]

Related posts:
SQL Server Management Studio - Export Query Results to Excel
Back Up MySQL
Enabling MySQL Logging
Adding Database Columns
MySQL New Releases
Document your Databases for Free


« iFood.tv, a foodie social network, power... | Main | Buying a Fridge a Month »
Comments are closed.