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
The
systenant and all user tenants can query this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
The
systenant and user tenants can modify this parameter.
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 you perform a DDL operation that requires rewriting data, you can distribute the rewriting of table data across multiple major compactions. In each major compaction, only part of the data is rewritten. You can use the progressive_merge_num table-level attribute to control the major compactions, or you can 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 progressive_merge_num table-level attribute to the value of default_progressive_merge_num.
The following table describes the meaning of the progressive_merge_num attribute.
- progressive_merge_num = 0: The value is 100.
- progressive_merge_num = 1: Full major compactions are performed. Incremental major compactions and progressive major compactions are not performed.
- progressive_merge_num = X: All data is rewritten after X rounds of major compactions. In each round, 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;