Skip to main content
9 events
when toggle format what by license comment
Apr 13, 2017 at 12:43 history edited CommunityBot
replaced http://dba.stackexchange.com/ with https://dba.stackexchange.com/
Oct 12, 2015 at 15:55 history edited RolandoMySQLDBA CC BY-SA 3.0
added 275 characters in body
Feb 28, 2013 at 3:25 comment added Michael - sqlbot Right, but I would assert that it happened immediately for you because the table you tested against was very small. When you OPTIMIZE TABLE on InnoDB, the server actually does in fact execute ALTER TABLE ... ENGINE=InnoDB and ANALYZE TABLE behind the scenes before returning that response... so you can indeed run OPTIMIZE TABLE on InnoDB, and achieve the intended effect.
Feb 27, 2013 at 21:27 comment added RolandoMySQLDBA @Michael-sqlbot As shown in my answer, I ran OPTIMIZE TABLE dat; in MySQL 5.5.29 and it complained immediately, Table does not support optimize, doing recreate + analyze instead. That's why I recommend ALTER TABLE dat ENGINE=InnoDB; ANALYZE TABLE dat;.
Feb 27, 2013 at 4:14 comment added Michael - sqlbot @RolandoMySQLDBA I'm not sure what mean when you say, "you cannot run OPTIMIZE TABLE." When you OPTIMIZE TABLE for an InnoDB table, MySQL is performing the ALTER TABLE ... ENGINE=InnoDB and ANALYZE TABLE ... operations for you when it says "doing recreate + analyze table instead."
Feb 27, 2013 at 3:33 history edited RolandoMySQLDBA CC BY-SA 3.0
added 2221 characters in body
Feb 27, 2013 at 3:27 history edited RolandoMySQLDBA CC BY-SA 3.0
added 2221 characters in body
Feb 27, 2013 at 3:23 comment added Boolean I think, optimize table for innodb is not supported. I got a message, index will be recreated. How does it work?
Feb 27, 2013 at 3:14 history answered RolandoMySQLDBA CC BY-SA 3.0