This topic introduces the major compaction parameters and describes how to modify the parameters.
Major compaction parameters
The following table describes the parameters related to major compactions.
| Parameter | Description | Default value | Value range |
|---|---|---|---|
| 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, +∞)
NoteYou can also use the |
| 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 the database as a tenant administrator.
Modify a major compaction parameter.
Here is an example:
obclient> ALTER SYSTEM SET major_freeze_duty_time='03:00';
Notice
Cluster-level parameters must be set in the sys tenant.
After the parameters are modified, you can execute the
SHOW PARAMETERSstatement to check whether the modification is successful.Here is an example:
obclient>SHOW PARAMETERS LIKE 'major_freeze_duty_time';