This topic describes how to modify major compaction parameters.
Major compaction parameters
The following table describes the major compaction parameters.
| Parameter | Description | Default value | Value range |
|---|---|---|---|
| enable_major_freeze | A cluster-level parameter indicating whether to enable major compactions. | True |
|
| major_freeze_duty_time | A tenant-level parameter indicating the time when a major compaction is scheduled to occur every day. | 02:00 | [00:00,24:00] |
| major_compact_trigger | A tenant-level parameter indicating the number of freezes after which a major compaction is triggered. | 0 | [0,65535] |
| default_progressive_merge_num | A tenant-level parameter indicating the default number of minor compactions during table creation. | 0 | [0, +∞) where:
NoteAfter the table is created, you can execute the |
| merger_check_interval | A tenant-level parameter indicating the interval for checking the major compaction progress in each zone. | 10m | [10s, 60m] |
Modify major compaction parameters by using an SQL statement
Log in to the database as the tenant administrator.
Execute the following SQL statement to modify the major compaction parameters.
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 modification, you can execute the
SHOW PARAMETERSstatement to verify whether the modification is successful.Here is an example:
obclient>SHOW PARAMETERS LIKE 'major_freeze_duty_time';