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 | Specifies whether to enable major compactions at the cluster level. | True |
|
| major_freeze_duty_time | The time when a major compaction is scheduled to start each day. | 02:00 | [00:00,24:00] |
| major_compact_trigger | The number of times a tenant needs to be frozen before a major compaction is triggered. | 0 | [0,65535] |
| default_progressive_merge_num | The default number of major compactions to perform after a schema change at the tenant level. | 0 | [0, +∞) where:
NoteAfter you create a table, you can execute the |
| merger_check_interval | The interval for checking the major compaction progress of 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 parameters are modified, 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';