MySQL Table does not support optimize

MySQLWordpress

My WordPress tables appear to be in need of optimization so I looked into the commmand OPTIMIZE TABLE . When I run the command I get the following results:

Table does not support optimize, doing
recreate + analyze instead

The tables are built using the WordPress 2.91 installer and haven't been modified at all.

  1. Is this normal?
  2. How can I optimize
    my database to keep things working
    correctly?

Best Answer

Have you found the MySQL documentation? It's extensive and useful.

When you run OPTIMIZE TABLE against InnoDB tables it outputs the Table does not support optimize, doing recreate + analyze instead message.

From the documentation:

OPTIMIZE TABLE is mapped to ALTER TABLE, which rebuilds the table to update index statistics and free unused space in the clustered index.

MySQL 5.1 OPTIMIZE TABLE syntax