Announcement

Announcement Module
Collapse
No announcement yet.

About optimize table

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • About optimize table

    Hi,

    I know how to use the optimize command for a table but when it is executing, why it creates a temp table?

    if i have a table with 50000000 or rows, it is a good practice to use it?

    using alter table, can i rebuild a table and update table statistics? How can i use it?

    Thanks for your help.

  • #2
    http://dev.mysql.com/doc/refman/5.1/...ize-table.html

    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.


    Index statistics can be updated with analyze table also.

    Comment

    Working...
    X