Overview
The default_table_merge_engine parameter specifies the default merge_engine for creating tables in a user tenant.
Privilege requirements
Query parameters
Both the
systenant and all user tenants can query this parameter using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify parameters
Both the
systenant and user tenants can modify this parameter.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | String |
| Default Value | partial_update |
| Value range |
|
| Modifiable | Yes, you can use the following methods:ALTER SYSTEM SETStatement modification. |
| Whether to restart the OBServer node for the change to take effect | No, the setting takes effect immediately. |
Usage instructions
The default_table_merge_engine parameter only affects the default format for creating primary tables in user tenants; it does not affect the meta or sys tenant. It also takes effect only when the merge_engine is not explicitly specified in the table creation statement. If the user explicitly specifies the table's merge_engine, the final table's merge_engine will be parsed according to the user-specified format.
The following values can be set for this parameter:
partial_update: If themerge_engineclause is not specified in the table creation statement, and the user tenant setsmerge_engine = partial_updateduring table creation, this mode is more storage-efficient and suitable for OLTP scenarios.delete_insert: If themerge_engineclause is not specified in the table creation statement, and the user tenant setsmerge_engine = delete_insertduring table creation, this mode offers better query performance and is suitable for OLAP scenarios.append_only: If themerge_engineclause is not specified in the table creation statement, and a user tenant creates a table withmerge_engine = append_only, data can only be written in this mode, not modified. This mode is suitable for scenarios such as IoT, monitoring, and financial transactions. To clean up expired data in this mode, you can use the TTL feature.
Configuration example
By default, the
merge_engine = partial_updateclause is added to a table creation statement when you create a table in a user tenant.obclient> ALTER SYSTEM SET default_table_merge_engine = 'partial_update';By default, the
merge_engine = delete_insertclause is set for tables created in user tenants. This clause is automatically added to the table creation statement.obclient> ALTER SYSTEM SET default_table_merge_engine = 'delete_insert';