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 execute the
SHOW PARAMETERSstatement or query theGV$OB_PARAMETERSview in thesystenant or a user tenant to query this parameter.Modify the parameter
You can modify this parameter in the
systenant or a user tenant.
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 rewriting data is performed on a table, the data rewriting can be distributed across multiple major compactions. In each major compaction, only a portion of the data is rewritten. You can use the progressive_merge_num table-level attribute to control the major compactions, 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 value of the progressive_merge_num table-level attribute is set to the value of default_progressive_merge_num.
The following table describes the meanings of the values of the progressive_merge_num attribute.
- progressive num = 0: Use the default value of 100.
- progressive num = 1: Force a full major compaction. Do not perform incremental or progressive major compactions.
- progressive num = X: Rewrite all data in X rounds of major compactions. In each round, rewrite 1/X of the data.
Examples
Set the default number of progressive major compactions for a new table to the default value of 100.
obclient> ALTER SYSTEM SET default_progressive_merge_num = 0;