Hope4You
Hope4You

Reputation: 1947

mysql - FLUSH TABLE needed?

After I REPAIR OPTIMIZE ANALYZE OR CHECK a table, do I need to FLUSH it?

Upvotes: 7

Views: 3656

Answers (1)

RolandoMySQLDBA
RolandoMySQLDBA

Reputation: 44363

A flush is not necessary.

When it comes to ANALYZE TABLE or CHECK TABLE, they just read the table. ANALYZE will write index statistics elsewhere.

When it comes to REPAIR TABLE or OPTIMIZE TABLE, they perform full DDL by copying the MyISAM table to a temp table and then renaming the table back.

Upvotes: 7

Related Questions