Note
For OceanBase Database V4.3.5, this parameter was introduced starting from V4.3.5 BP3; For OceanBase Database V4.4.X, this parameter was introduced starting from V4.4.0.
Description
default_table_merge_engine specifies the default value of merge_engine when a user tenant creates a table.
Privilege requirements
- Query the parameter
The sys tenant and all user tenants can execute the SHOW PARAMETERS statement or query the GV$OB_PARAMETERS view to obtain the value of this parameter.
- Modify the parameter
The sys tenant and user tenants can modify this parameter.
Attributes
| Attribute | Description |
|---|---|
| Parameter type | String |
| Default value | partial_update |
| Value range |
NoteFor V4.6.x, |
| Modifiable | Yes. You can execute the ALTER SYSTEM SET statement to modify this parameter. |
| Effective upon OBServer node restart | No |
Considerations
The parameter default_table_merge_engine only affects the default format for creating primary tables in user tenants. It does not affect the meta tenant or the sys tenant. This parameter takes effect only when the merge_engine is not explicitly specified in the CREATE TABLE statement. If the user explicitly specifies the merge_engine for the table, the final merge_engine of the table will be parsed according to the user’s specification.
This parameter can be set to the following values:
default_table_merge_engine = partial_update: if the CREATE TABLE statement does not specify amerge_engine, themerge_enginefor the table created by a user tenant will bepartial_update. This mode records only the modified columns during each update, saving storage space. It is suitable for OLTP scenarios.default_table_merge_engine = delete_insert: if the CREATE TABLE statement does not specify amerge_engine, themerge_enginefor the table created by a user tenant will bedelete_insert. This mode writes the entire row during each update. It supports Delta SSTable Skip Index, allowing for filtering of incremental data during queries. It is suitable for OLAP scenarios.
Examples
By default,
merge_engine = partial_updateis used by the user tenant for table creation, and themerge_engine = partial_updateattribute is automatically added to the table creation statement.ALTER SYSTEM SET default_table_merge_engine = partial_update;By default,
merge_engine = delete_insertis used by the user tenant for table creation, and themerge_engine = delete_insertattribute is automatically added to the table creation statement.ALTER SYSTEM SET default_table_merge_engine = delete_insert;
