Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?
share|improve this question
    
Did you get your table optimized? –  Richard Holloway Aug 13 '10 at 23:43
add comment

4 Answers

You can optimize an InnoDB table by doing

ALTER TABLE tablename ENGINE='InnoDB';

This will create a copy of the original table drop the original table and put the new table in it's place.

There is some additional information here which includes things you should be aware of.

Also in the MySQL Documentation. See the comment by Dathan Pattishall on May 25 2004 4:41pm about half way down the page.

Although this should be safe to do you should make and test a backup first.

share|improve this answer
    
Thanks, I'll give it a try... –  Dscoduc Mar 24 '10 at 0:15
1  
This produces the exact same results as running OPTIMIZE TABLE against an InnoDB table in MySQL. –  Warner Mar 24 '10 at 5:13
add comment

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

share|improve this answer
    
With this in mind, be certain as to your engine before enabling skip-innodb as I suggested in your earlier post. –  Warner Mar 23 '10 at 21:26
    
Funny, I searched many times for support on this topic and didn't find that info... So, actually, the mySQL documentation isn't really that useful.... Even so, I still don't see an answer to my question on how to keep my database working correctly without being able to optimize the database... –  Dscoduc Mar 23 '10 at 21:47
    
The message indicates that it is optimizing the table. The reason why it's so verbose is because it's essentially a shortcut for the alter table statement, which is what had to be used instead in earlier versions of MySQL because OPTIMIZE TABLE couldn't be run against InnoDB. Why do you believe you need to optimize the table for your database to operate correctly? –  Warner Mar 24 '10 at 5:09
add comment

it is possible

use a wp database plugin like http://wordpress.org/extend/plugins/wp-dbmanager/

& activate the plugin

& go to the page & click on optimize database it will optimize your database

No need of entering any sql logins. It fetches from wp-config.php

share|improve this answer
add comment

OPTIMIZE does work for InnoDB. At least it does now. This is 5.6 documentation:

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.