[MDEV-10453] Allow ONLINE or ALGORITHM=INPLACE with OPTIMIZE TABLE Created: 2016-07-27 Updated: 2020-02-20 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Chris Calender (Inactive) | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
We should allow ONLINE or ALGORITHM=INPLACE to be used with OPTIMIZE TABLE. MySQL Supports this in 5.7: 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; 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. |
| Comments |
| Comment by Marko Mäkelä [ 2019-03-22 ] | |||||||||||||
|
| |||||||||||||
| Comment by Chris Calender (Inactive) [ 2019-05-21 ] | |||||||||||||
|
If that is the case, then that sounds great to me. | |||||||||||||
| Comment by Geoff Montee (Inactive) [ 2019-05-22 ] | |||||||||||||
|
Isn't this already supported if OPTIMIZE TABLE is equivalent to ALTER TABLE ... FORCE if the innodb_defragment system variable and the innodb_optimize_fulltext_only system variable are both set to OFF? https://mariadb.com/kb/en/library/innodb-online-ddl-operations-with-algorithminplace/#optimize-table i.e. this works just fine:
|