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 the parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
The
systenant and user tenants can modify the 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 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 part of the data is rewritten. You can use the table-level attribute progressive_merge_num to control the major compactions, or you can set 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 following table describes the meanings of the values of the progressive_merge_num attribute:
- progressive num = 0: The default value of 100 is used.
- progressive num = 1: Full major compactions are performed. Incremental major compactions and progressive major compactions are not performed.
- progressive 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 to 100.
obclient> ALTER SYSTEM SET default_progressive_merge_num = 0;