|
1 | 1 | # MyRocks limitations
|
2 | 2 |
|
3 |
| -The MyRocks storage engine lacks the following features compared to InnoDB: |
| 3 | +Compared to InnoDB, the MyRocks storage engine lacks the following features: |
4 | 4 |
|
5 |
| -* [Online DDL](https://dev.mysql.com/doc/refman/8.0/en/innodb-online-ddl.html) is generally **not supported** due to the lack of atomic DDL support. |
| 5 | +* MyRocks has limited support for [Online DDL operations](https://dev.mysql.com/doc/refman/8.0/en/innodb-online-ddl.html) due to the lack of atomic DDL. As a result the schema changes are more restricted compared to InnoDB. disruptive compared to InnoDB. |
6 | 6 |
|
7 |
| - As of Percona Server for MySQL 8.0.42-33, RocksDB supports a limited set of Instant DDL operations through specific configuration variables: |
| 7 | + * `Traditional MyRocks DDL behavior` |
8 | 8 |
|
9 |
| - * [`--rocksdb_enable_instant_ddl_for_append_column`](variables.md#rocksdb_enable_instant_ddl_for_append_column) |
10 |
| - * [`--rocksdb_enable_instant_ddl_for_column_default_changes`](variables.md#rocksdb_enable_instant_ddl_for_column_default_changes) |
11 |
| - * [`--rocksdb_enable_instant_ddl_for_drop_index_changes`](variables.md#rocksdb_enable_instant_ddl_for_drop_index_changes) |
12 |
| - * [`--rocksdb_enable_instant_ddl_for_table_comment_changes`](variables.md#rocksdb_enable_instant_ddl_for_table_comment_changes) |
| 9 | + | Operation type | Examples | ALGORITHM | |
| 10 | + |---------------------|--------------------------------------------------|-----------------------------| |
| 11 | + | Index operations | `ADD INDEX`, `DROP INDEX`, `RENAME INDEX` | `INPLACE` (always) | |
| 12 | + | Column changes | `ADD COLUMN`, `DROP COLUMN`, `MODIFY COLUMN` | `COPY` (full table rebuild) | |
| 13 | + | Metadata changes | `RENAME TABLE`, some `RENAME COLUMN` operations | May be `INSTANT` | |
13 | 14 |
|
14 |
| - However, RocksDB has important limitations compared to InnoDB's Instant DDL support. |
15 |
| - |
16 |
| - * The explicit `ALTER TABLE ... ALGORITHM=INSTANT` syntax is not supported for RocksDB tables. |
| 15 | + **Note:** MyRocks does not support atomic DDL. Even metadata-only operations may require a full table rebuild, depending on the nature of the change. |
17 | 16 |
|
18 |
| - * As of Percona Server for MySQL 8.0.25-15, certain partition management operations support the `INPLACE` algorithm. For example, dropping a partition can now be performed without a full table rebuild. |
| 17 | + * As of `Percona Server for MySQL 8.0.25-15`, MyRocks supports `INPLACE` partition management for certain operations: |
19 | 18 |
|
20 | 19 | ```sql
|
21 |
| - ALTER TABLE t1 ALGORITHM=INPLACE, DROP PARTITION p2; |
| 20 | + ALTER TABLE t1 DROP PARTITION p1, ALGORITHM=INPLACE; |
| 21 | + ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES LESS THAN (MAXVALUE)), ALGORITHM=INPLACE; |
22 | 22 | ```
|
23 |
| - However, not all partition operations support `INPLACE`. Operations that modify the partitioning scheme, such as changing `PARTITION ... VALUES`, still require the `COPY` algorithm. In these cases, the table is rebuilt, and data is redistributed according to the new partition definition. |
| 23 | + The aforementioned operations no longer require a full table rebuild. However, operations that modify partitioning schemes, such as changing `VALUES LESS THAN`, still fall back to the `COPY` algorithm. |
| 24 | + |
| 25 | + **Note:** Dropping a partition permanently deletes any data stored in it unless that data is reassigned to another partition. |
| 26 | + |
| 27 | + |
| 28 | + * As of `Percona Server for MySQL 8.0.42-33`, MyRocks introduces limited support for Instant DDL, which is disabled by default and controlled via configuration variables. |
| 29 | + |
| 30 | + To enable specific types of instant operations, use the following configuration options: |
| 31 | + |
| 32 | + | Configuration variable | Enables Instant DDL for | ALGORITHM (internal only) | |
| 33 | + |------------------------|--------------------------|----------------------------| |
| 34 | + | [`rocksdb_enable_instant_ddl_for_append_column=ON`](variables.md#rocksdb_enable_instant_ddl_for_append_column) | `ALTER TABLE ... ADD COLUMN` | `INSTANT` | |
| 35 | + | [`rocksdb_enable_instant_ddl_for_column_default_changes=ON`](variables.md#rocksdb_enable_instant_ddl_for_column_default_changes) | `ALTER/MODIFY COLUMN … DEFAULT` | `INSTANT` | |
| 36 | + | [`rocksdb_enable_instant_ddl_for_drop_index_changes=ON`](variables.md#rocksdb_enable_instant_ddl_for_drop_index_changes) | `ALTER TABLE ... DROP INDEX` | `INSTANT` | |
| 37 | + | [`rocksdb_enable_instant_ddl_for_table_comment_changes=ON`](variables.md#rocksdb_enable_instant_ddl_for_table_comment_changes) | `ALTER TABLE ... COMMENT` | `INSTANT` | |
24 | 38 |
|
25 |
| - Note that if you use `DROP PARTITION` without reassigning data to another partition, any data contained in the dropped partition will be permanently deleted. |
| 39 | + **Note:** MyRocks does **not support `ALGORITHM=INSTANT`** in SQL syntax. These operations behave like Instant DDL **internally**, but only if the respective configuration variables are enabled. |
26 | 40 |
|
27 | 41 | * [ALTER TABLE .. EXCHANGE PARTITION](https://dev.mysql.com/doc/refman/8.0/en/partitioning-management-exchange.html).
|
28 | 42 |
|
|
0 commit comments