OceanBase logo

OceanBase

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

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

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

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 Best Practices

All Versions

  • Deploy
    • Configuration guide for read-write splitting in AP scenarios
    • Best practices for read-write splitting
  • Migrate
    • Data transfer solutions in OceanBase Database
    • Overview on data migration
    • Best practices for importing data files to OceanBase Database
    • Best practice for migrating data from other databases to OceanBase Database
    • Massive data migration strategy
    • Best practices for migrating data from MyCat to OceanBase Database
    • Best practices for migrating PostgreSQL to OceanBase MySQL-compatible mode
  • Route
    • ODP routing best practices
  • Table Design
    • Best practices for table design and index optimization
    • Best practices for creating indexes on large tables
    • Best practices for database development
  • Develop
    • Best practices for connecting Java applications to OceanBase Database
    • Best practices for integrating Spark Catalog with OceanBase Database
    • Best practices for achieving optimal performance in batch DML using JDBC and OBServer
    • Best practices for bulk data cleanup in OceanBase Database
    • Best practices for PDML processing in OceanBase Database
    • Best practices for hot tables in OceanBase Database
    • Best practices for auto-increment columns and sequences in OceanBase Database
  • Manage
    • Best practices for resource throttling
    • Best practices for data load balancing
    • Best practices for security certification
    • Best practices for access control
    • Best practices for data encryption
  • Diagnose
    • Best practices for log interpretation in common scenarios
    • Best practices for end-to-end tracing
    • Best practices for using obdiag to collect performance information
    • Best practices for using obdiag to collect diagnostic information of parallel and slow SQL statements
    • Best practices for troubleshooting OceanBase Database performance issues
  • Performance Tuning
    • Best practices for handling slow queries
    • Best practices for collecting statistics to generate an efficient execution plan
    • Best practices for updating hotspot rows
    • Best practices for large object storage performance
    • Best practices for semi-structured storage performance
    • Best practices for OceanBase materialized views
  • Cloud Database
    • Best practices for achieving high availability through cross-cloud active-active deployment
    • High availability through primary and standby databases across clouds
    • High host CPU usage
    • Best practices for read/write splitting in OceanBase Cloud

Download PDF

Configuration guide for read-write splitting in AP scenarios Best practices for read-write splitting Data transfer solutions in OceanBase Database Overview on data migration Best practices for importing data files to OceanBase Database Best practice for migrating data from other databases to OceanBase Database Massive data migration strategy Best practices for migrating data from MyCat to OceanBase Database Best practices for migrating PostgreSQL to OceanBase MySQL-compatible mode ODP routing best practices Best practices for table design and index optimization Best practices for creating indexes on large tables Best practices for database development Best practices for connecting Java applications to OceanBase Database Best practices for integrating Spark Catalog with OceanBase Database Best practices for achieving optimal performance in batch DML using JDBC and OBServer Best practices for bulk data cleanup in OceanBase Database Best practices for PDML processing in OceanBase Database Best practices for hot tables in OceanBase Database Best practices for auto-increment columns and sequences in OceanBase Database Best practices for resource throttling Best practices for data load balancing Best practices for security certification Best practices for access control Best practices for data encryption Best practices for log interpretation in common scenarios Best practices for end-to-end tracing Best practices for using obdiag to collect performance information Best practices for using obdiag to collect diagnostic information of parallel and slow SQL statements Best practices for troubleshooting OceanBase Database performance issues Best practices for handling slow queries Best practices for collecting statistics to generate an efficient execution plan Best practices for updating hotspot rows Best practices for large object storage performance Best practices for semi-structured storage performance Best practices for OceanBase materialized views Best practices for achieving high availability through cross-cloud active-active deployment High availability through primary and standby databases across clouds High host CPU usage Best practices for read/write splitting in OceanBase Cloud
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 Best Practices
  3. master
iconOceanBase Best Practices
master
  • master

Best practices for troubleshooting OceanBase Database performance issues

Last Updated:2025-02-25 08:52:34  Updated
share
What is on this page
Background information
Factors affecting the performance
Deployment-related issues
Suboptimal plans and missing key optimizations
System-related issues
Logic of troubleshooting
Diagnostic rules
Troubleshooting tools

folded

share

Background information

During routine maintenance, you may encounter complex troubleshooting scenarios where significant effort is required, yet the root cause of the issue remains unclear.

Below are some common scenarios:

  • Standard benchmark results show significant discrepancies compared with internal performance data.
  • Performance in low-concurrency scenarios is poor, with execution times not meeting expectations.
  • Stress test results appear satisfactory, but it is unclear whether they represent OceanBase Database’s maximum capabilities.
  • High CPU utilization is observed, but queries per second (QPS) remains low, resulting in poor performance.
  • In high-concurrency stress tests, CPU utilization is low, link latency is minimal, yet QPS remains low.
  • Uneven load distribution occurs across servers in multi-server deployment scenarios.

Factors affecting the performance

Deployment-related issues

  • Hardware deployment

    • Deploying OceanBase Database Proxy (ODP) and OceanBase Database on the same server can result in high resource overhead, especially during high-concurrency stress tests.
    • Deploying the stress test client, load balancer, and ODP across different IDCs increases latency.
    • Limited connection counts or small-performance specifications on servers where the load balancer or ODP resides can easily become bottlenecks.
    • Sharing disks for data and logs compromises performance during high-concurrency write operations.
  • Transaction model

    • Remote execution and distributed transaction commits degrade performance.
    • If partition pruning is not applied to a single SQL statement, it will result in full partition scans, wasting resources.
    • Incorrect routing by ODP can cause requests to be randomly distributed, leading to inefficiencies.

Suboptimal plans and missing key optimizations

  • Execution plan: Multi-level nested loop joins (NLJs) significantly compromise the efficiency of execution plans. Batch rescan is not supported.
  • Data model: A well-designed data model, including proper use of cardinalities and buffer tables, is critical for optimal performance.
  • Index strategy: Proper index usage is essential to avoid unnecessary random writes and full-table scans.

System-related issues

  • System hotspots: Internal implementations of OceanBase Database may create system hotspots, increasing CPU overhead.
  • Kernel configurations: Misconfigured system kernel parameters can severely impact performance.
  • I/O performance: Insufficient disk IOPS, read/write bandwidth, or network bandwidth will lead to performance degradation.

Logic of troubleshooting

Diagnostic rules

  • Cluster deployment

    • If possible, avoid deploying ODP on the same server as OceanBase Database. ODP may compromise performance in extreme scenarios.
    • Typically, latency benchmarks are as follows: 50 to 170 μs within the same IDC and approximately 1.5 ms between two IDCs in the same region. For cross-region deployment: 5 ms between Region A and Region B, and 25 ms between Region B and Region C. Actual latency depends on the network environment.
    • For high-performance stress tests, such as Sysbench benchmarks with Point Select, we recommend removing ODP.
  • Scalability

    • To achieve linear scalability, ensure that the link components, transaction model, and various kernel modules of OceanBase Database fully support linear scaling. If any component becomes a bottleneck, linear scalability cannot be achieved.

      • Transactions must be executed on a single server, and SQL statements must not involve remote procedure calls (RPCs).
      • The software and hardware resources of the physical servers hosting the client and ODP must support linear scaling.
    • Use the Top SQL feature in OceanBase Cloud Platform (OCP) to monitor SQL statements. Pay special attention to SQL statements that meet the following conditions: the RPC count is greater than or equal to 1, the partition count is greater than 1, or a non-local plan is used. Sort SQL statements by CPU utilization in descending order and analyze each statement for potential issues.

  • Single-threaded smoke testing

    • For time-consuming SQL statements in simple scenarios, perform a low-concurrency stress test. Measure the latency across the entire chain: Application server -> Load balancer -> ODP -> Leader in OceanBase Database, and analyze key bottlenecks.
  • System environment data

    • In high-concurrency stress tests, ensure that the system CPU utilization does not exceed 15%. If this threshold is exceeded, analyze the causes.
    • Ensure that the CPU is running at full load during high-concurrency tests. If the CPU is underutilized, investigate the reasons.
    • Verify that the response time of I/O operations on data and log disks, as well as the TCP retransmission rate, remain within reasonable ranges.
  • Examples of using OCP diagnostics

    • Top SQL statements: Go to the top SQL statements page in OceanBase Autonomy Service (OAS). Analyze SQL statements with the following characteristics to assess potential risks:

      • The number of table scans is 1.

      • The number of RPCs exceeds 0.

      • The number of accessed partitions exceeds 1.

      • The execution time of simple SQL statements (such as those returning a small number of rows or based on primary keys or indexes) exceeds 1 ms.

    • Slow queries:

      • Go to the slow queries page in OAS. Sort SQL statements by the following dimensions and pay attention to the following two types:

        • Total database time: Identify the top N SQL statements with the longest total database time.

        • Maximum response time: Identify the top N SQL statements with the longest response time.

    • Perform a refined analysis of the identified SQL statements as follows:

      • whether the SQL statements meet the four check items for top SQL statements.
      • Check whether the execution plan is correct.
      • Check whether the degree of parallelism (DOP) exceeds 1.

Troubleshooting tools

  • OCP

    • Use the SQL panorama to analyze business SQL statements. Focus on SQL statements that involve RPCs, cross-partition access, disk reads, or abnormal execution plans.

    • Monitor key metrics, including CPU utilization, I/O response times for data and clog operations, SQL response times, and workload balancing.

  • Active session history (ASH) reports

    • Starting from OceanBase Database V4.x, more detailed monitoring data is available. You can generate ASH reports to obtain detailed monitoring data for individual SQL statements. For more information, see Generate ASH reports.
  • top -H -p {PID of the observer process}

    • Use this command to view all threads of the observer process. Analyze the usage of worker threads, I/O threads, and minor compaction threads. Check whether OceanBase Database configurations are reasonable or if bottlenecks exist.

    • In specific scenarios, analyze the status of each worker thread to help identify and resolve performance issues.

Previous topic

Best practices for using obdiag to collect diagnostic information of parallel and slow SQL statements
Last

Next topic

Best practices for handling slow queries
Next
What is on this page
Background information
Factors affecting the performance
Deployment-related issues
Suboptimal plans and missing key optimizations
System-related issues
Logic of troubleshooting
Diagnostic rules
Troubleshooting tools