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.1

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & Certification
    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.1
    iconOceanBase Database
    SQL - V 4.3.1
    SQL
    KV
    • 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

    Buffer tables

    Last Updated:2026-04-15 08:25:14  Updated
    share
    What is on this page
    Buffer table determination logic

    folded

    share

    Data is frequently inserted to or deleted from a buffer table. An index table is also a buffer table. When the indexed column of a primary table is updated, data is inserted to or deleted from the index table. Buffer table exceptions are likely for storage engines based on the log-structured merge-tree (LSM-tree) architecture. In an LSM-tree-based storage engine, data is divided into baseline data and incremental data. The incremental data is stored in MemTables in the memory and is written to minor compaction SSTables on the disk through minor compactions, and then written to the baseline SSTables on the disk through a daily major compaction. During the execution of a query, the MemTables, minor compaction SSTables, and baseline SSTables are all queried to return the final data. In an LSM-tree architecture, deleted data is first labelled as deleted but is physically deleted only after the daily major compaction. If a large amount of incremental data is labelled as deleted, few rows are actually available for upper-layer applications. In addition, the labelled data may be processed during range queries, which is time-consuming and results in long execution time of SQL queries. In the presence of buffer tables, the optimizer is prone to generate suboptimal execution plans.

    A buffer table has the following characteristics:

    • Trigger condition:

      A large part of data in the table is frequently updated.

    • Scenario:

      • The application logic involves a large number of insert and delete operations.

      • The application logic involves a large number of index column updates.

    • Symptom:

      The table does not have a large number of rows, but the table query is slow.

    • Cause:

      • A large amount of data labelled as deleted is processed during range queries.

      • A suboptimal execution plan is used.

    After you confirm that the performance bottleneck is due to SQL execution by using the V$OB_SQL_AUDIT view, if the suspicious SQL query has the characteristics of a range query, you can further confirm whether the table involved is a buffer table.

    Note

    For more information about the V$OB_SQL_AUDIT view, see V$OB_SQL_AUDIT (Oracle mode) or V$OB_SQL_AUDIT (MySQL mode).

    Buffer table determination logic

    You can obtain the total number of rows of a table and the numbers of inserted, updated, and deleted rows by using internal views. If the table meets any of the following conditions, it is a buffer table:

    • Large and roughly equal numbers of rows are inserted to and deleted from the primary table.

    • A large proportion of rows of the index columns are updated.

    You can use the following methods to solve this issue:

    • Check whether a better execution plan is available and, if yes, manually bind it by executing the CREATE OUTLINE statement.

    • Manually trigger a major compaction to physically delete the data that is labelled as deleted.

    If no better execution plan is available, you can manually trigger a major compaction to reduce memory usage. However, to completely rectify this problem, use the following methods:

    • Perform scale-out.

    • Increase the value of the system parameter cpu_quota_concurrency.

      The cpu_quota_concurrency parameter specifies the maximum concurrency allowed for each CPU quota of a tenant. For more information, see cpu_quota_concurrency.

    • Perform throttling for the problematic SQL query.

    Previous topic

    Suboptimal plans
    Last

    Next topic

    Cardinality
    Next
    What is on this page
    Buffer table determination logic