Note
For V2.2.30, this parameter is available starting with V2.2.30.
Description
default_progressive_merge_num specifies the default number of progressive major compactions for a new table.
Privilege requirements
Query the parameter
You can use the
SHOW PARAMETERSstatement or theGV$OB_PARAMETERSview to query this parameter in thesystenant and all user tenants.Modify the parameter
You can modify this parameter in the
systenant and user tenants.
Attributes
| Attribute | Description |
|---|---|
| Type | Int |
| Default value | 0 |
| Value range | [0, +∞) |
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer node restart | No. The setting takes effect immediately. |
Considerations
OceanBase Database supports progressive major compactions. After a DDL operation that requires data rewrite is performed on a table, you can distribute the data rewrite across multiple major compactions. In each major compaction, only part of the data is rewritten. You can use the table-level attribute progressive_merge_num to control the major compaction behavior, or use the default_progressive_merge_num parameter to specify the default number of progressive major compactions for a new table.
If you do not specify the progressive_merge_num attribute for a new table, the system sets the value of the table-level attribute progressive_merge_num to the value of default_progressive_merge_num.
The value of the progressive_merge_num attribute indicates the following:
- progressive_merge_num = 0: The default value of 100 is used.
- progressive_merge_num = 1: Full major compactions are performed, and incremental or progressive major compactions are not performed.
- progressive_merge_num = X: All data is rewritten across X major compactions. In each major compaction, 1/X of the data is rewritten.
Examples
Set the default number of progressive major compactions for a new table to 100.
obclient> ALTER SYSTEM SET default_progressive_merge_num = 0;
