OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Database

SQL - V4.3.3

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & CertificationTicket
    Company
    About OceanBaseTrust CenterLegalPartnerContact Us
    Follow Us

    © OceanBase 2026. All rights reserved

    Cloud Service AgreementPrivacy PolicySecurity
    Contact Us
    Document Feedback
    1. Documentation Center
    2. OceanBase Database
    3. SQL
    4. V4.3.3
    iconOceanBase Database
    SQL - V 4.3.3
    Databases
    • OceanBase Database
    • OceanBase Cloud
    • OceanBase Tugraph
    • Interactive Tutorials
    • OceanBase Best Practices
    Tools
    • OceanBase Cloud Platform
    • OceanBase Migration Service
    • OceanBase Developer Center
    • OceanBase Migration Assessment
    • OceanBase Admin Tool
    • OceanBase Loader and Dumper
    • OceanBase Deployer
    • Kubernetes operator for OceanBase
    • OceanBase Diagnostic Tool
    • OceanBase Binlog Service
    Connectors and Middleware
    • OceanBase Database Proxy
    • Embedded SQL in C for OceanBase
    • OceanBase Call Interface
    • OceanBase Connector/C
    • OceanBase Connector/J
    • OceanBase Connector/ODBC
    • OceanBase Connector/NET
    SQL
    KV
    • V 4.6.0
    • V 4.4.2
    • V 4.3.5
    • V 4.3.3
    • V 4.3.1
    • V 4.3.0
    • V 4.2.5
    • V 4.2.2
    • V 4.2.1
    • V 4.2.0
    • V 4.1.0
    • V 4.0.0
    • V 3.1.4 and earlier

    Modify minor compaction settings

    Last Updated:2024-12-02 03:48:29  Updated
    Share
    What is on this page
    Minor compaction parameters
    Modify minor compaction parameters by using SQL statements

    folded

    Share

    This topic introduces the minor compaction parameters and describes how to set these parameters.

    Minor compaction parameters

    Parameter
    Description
    Default value
    Value range
    minor_compact_trigger The number of SSTables for triggering a minor compaction. It is a tenant-level parameter. 2 [0, 16]
    freeze_trigger_percentage The maximum percentage of memory space used by the MemStore of the tenant to trigger a minor freeze. This is a tenant-level parameter. 20 (0, 100)
    memstore_limit_percentage The percentage of MemStore memory to the total memory of the tenant. It is a cluster-level parameter.

    Note

    Starting from OceanBase Database V4.3.0, the V4.3.x series provide the tenant-level hidden parameter _memstore_limit_percentage, which specifies the percentage of the memory that can be occupied by the MemStore to the total available memory of a tenant. The parameter has the same feature and default value as the cluster-level parameter memstore_limit_percentage. Take note of the following considerations when you configure these two parameters:

    • If you set either _memstore_limit_percentage or memstore_limit_percentage to a non-default value, the value prevails.
    • If you set both _memstore_limit_percentage and memstore_limit_percentage to non-default values, the value of _memstore_limit_percentage prevails.
    • If neither is configured or both are set to default values, the system adopts the following adaptive strategy:
      • For a tenant with a memory of 8 GB or less, the percentage of the memory that can be occupied by MemStore is 40%.
      • For a tenant with a memory of more than 8 GB, the percentage of the memory that can be occupied by MemStore is 50%.
    0 [0, 100)

    Modify minor compaction parameters by using SQL statements

    1. Log in to the database as a tenant administrator.

    2. Execute the following sample statements to modify minor compaction parameters:

      obclient> ALTER SYSTEM SET minor_compact_trigger=2;
      
      obclient> ALTER SYSTEM SET major_compact_trigger=10;
      
      obclient> ALTER SYSTEM SET freeze_trigger_percentage=20;
      
      obclient> ALTER SYSTEM SET memstore_limit_percentage=50;
      
    3. After the parameters are modified, you can execute the SHOW PARAMETERS statement to check whether the modification is successful.

      Here are some examples:

      obclient> SHOW PARAMETERS LIKE 'minor_compact_trigger';
      
      obclient> SHOW PARAMETERS LIKE 'major_compact_trigger';
      
      obclient> SHOW PARAMETERS LIKE 'freeze_trigger_percentage';
      
      obclient> SHOW PARAMETERS LIKE 'memstore_limit_percentage';
      

    Previous topic

    View the minor compaction information
    Last

    Next topic

    Overview
    Next
    What is on this page
    Minor compaction parameters
    Modify minor compaction parameters by using SQL statements