This topic describes the major compaction parameters and how to modify the parameters.
Major compaction parameters
The following table describes the parameters related to major compactions.
| Parameter | Description | Default value | Valid values |
|---|---|---|---|
| enable_major_freeze | Specifies whether to enable major compaction. It is a cluster-level parameter. | True |
|
| major_freeze_duty_time | The scheduled time for daily major compactions. It is a cluster-level parameter. | 02:00 | [00:00,24:00] |
| major_compact_trigger | The number of minor compactions for triggering a major compaction. It is a tenant-level parameter. | 0 | [0,65535] |
| default_progressive_merge_num | The default major compaction mode specified during table creation. It is a tenant-level parameter. | 0 | [0, +∞)
|
| merger_check_interval | The interval for checking the major compaction progress of each zone. It is a tenant-level parameter. | 10m | [10s, 60m] |
Modify major compaction parameters by using an SQL statement
Log on to OceanBase Database as the administrator of the tenant.
Execute the following statement to modify a major compaction parameter.
Sample code:
obclient> ALTER SYSTEM SET major_freeze_duty_time='03:00';Notice
Cluster-level parameters must be set in the
systenant.After the parameters are modified, you can execute the
SHOW PARAMETERSstatement to check whether the modification is successful.Sample code:
obclient>SHOW PARAMETERS LIKE 'major_freeze_duty_time';