Based on the timestamps, triggering conditions, and number of minor compactions, you can learn about the memory usage of the cluster and thereby resize the tenant memory and configure the number of minor compactions to cope with your business needs.
Procedure
Log on to the
systenant as therootuser.Access the database named
oceanbase.obclient> USE oceanbaseView the minor compaction information.
obclient> SELECT * FROM gv$merge_info;The following table describes the fields in the return results.
Field Description SVR_IP The IP address of the server. SVR_PORT The port number of the server. TENANT_ID The ID of the tenant. TABLE_ID The ID of the table. PARTITION_ID The ID of the partition. TYPE The type of the compaction. Valid values: - minor
- major
ACTION The type of actions in the compaction. Valid values: - mini
- mini minor
- buffer minor
- minor
VERSION The version number of the data generated through the minor compaction. START_TIME The time when the minor compaction started. END_TIME The time when the minor compaction ended. MACRO_BLOCK_COUNT The total number of macro blocks in the minor compaction. REUSE_PCT The reuse rate of macro blocks in the minor compaction. PARALLEL_DEGREE The degree of parallelism of tasks in the minor compaction.