Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
We should allow ONLINE or ALGORITHM=INPLACE to be used with OPTIMIZE TABLE.
MySQL Supports this in 5.7:
"As of 5.7.4, OPTIMIZE TABLE uses online DDL (ALGORITHM=INPLACE) for both regular and partitioned InnoDB tables. The table rebuild, triggered by OPTIMIZE TABLE and performed under the cover by ALTER TABLE ... FORCE, is now performed using online DDL (ALGORITHM=INPLACE) and only locks the table for a brief interval, which reduces downtime for concurrent DML operations."
http://dev.mysql.com/doc/refman/5.7/en/optimize-table.html
We may support it, but it is not mentioned in the Docs as far as I can tell.
However, we do "allow" an online optimize, per any of the following commands:
ALTER TABLE t ENGINE=InnoDB, ALGORITHM=INPLACE;
ALTER ONLINE TABLE t ENGINE=InnoDB;
ALTER ONLINE TABLE t FORCE;
So I think it would be fairly straight-forward to add an ONLINE keyword to be used with OPTIMZE.
Or if it is performed automatically (which I now suspect), then perhapos we just need to mention this in our manual.
Thank you for your consideration.
Attachments
Issue Links
- relates to
-
MDEV-16329 Engine-independent online ALTER TABLE
- Closed
-
MDEV-12955 Use InnoDB's fast index creation to rebuild secondary indexes during OPTIMIZE TABLE
- Open