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

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogWhite PaperLive 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.2.5
    iconOceanBase Database
    SQL - V 4.2.5
    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

    oceanbase.CDB_OB_BALANCE_JOBS

    Last Updated:2026-04-27 03:14:13  Updated
    Share
    What is on this page
    Purpose
    Columns
    Sample query
    References

    folded

    Share

    Note

    This view is available starting with V4.2.0.

    Purpose

    This view CDB_OB_BALANCE_JOBS displays the load balancing jobs that are currently being executed in all tenants. Each tenant can have only one load balancing job (JOB) running at a time. Each load balancing job generates multiple load balancing tasks (TASK) to perform the specific operations of load balancing.

    Columns

    Column
    Type
    Nullable
    Description
    TENANT_ID bigint(20) NO The tenant ID.
    • 1: the ID of the sys tenant.
    • Other values: the ID of a user tenant or a Meta tenant.
    JOB_ID bigint(20) NO The ID of the load balancing job.
    CREATE_TIME timestamp(6) NO The creation time.
    MODIFY_TIME timestamp(6) NO The time when the information was last updated.
    BALANCE_STRATEGY varchar(64) NO The name of the balancing strategy.
    • LS balance by migrate: migration-based balancing
    • LS balance by alter: log stream attribute modification-based balancing
    • LS balance by expand: expansion-based balancing
    • LS balance by shrink: reduction-based balancing
    • partition balance: partition-based balancing
    JOB_TYPE varchar(64) NO The task type.
    • LS_BALANCE: log stream balancing
    • PARTITION_BALANCE: partition balancing
    TARGET_UNIT_NUM bigint(20) NO The number of units to be changed in each zone.
    TARGET_PRIMARY_ZONE_NUM bigint(20) NO The number of primary zones to be changed.
    STATUS varchar(64) NO The task status.
    • DOING: the job is being executed.
    • COMPLETED: the task was executed successfully.
    • CANCELING: the task is being canceled.
    • CANCELED: the task was canceled.
    • SUSPEND: the task is suspended.
    COMMENT longtext YES The comment.
    MAX_END_TIME timestamp(6) YES The maximum end time of the load balancing task.

    Note

    This column is available starting with V4.2.4.

    Sample query

    Query the load balancing jobs that are currently being executed in all tenants.

    obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_BALANCE_JOBS;
    

    The query result is as follows:

    +-----------+--------+----------------------------+----------------------------+---------------------------+--------------------+-----------------+-------------------------+--------+---------+--------------+
    | TENANT_ID | JOB_ID | CREATE_TIME                | MODIFY_TIME                | BALANCE_STRATEGY          | JOB_TYPE           | TARGET_UNIT_NUM | TARGET_PRIMARY_ZONE_NUM | STATUS | COMMENT | MAX_END_TIME |
    +-----------+--------+----------------------------+----------------------------+---------------------------+--------------------+-----------------+-------------------------+--------+---------+--------------+
    |      1002 |  68699 | 2024-12-31 17:24:16.758260 | 2024-12-31 17:24:16.758260 | manual transfer partition | TRANSFER_PARTITION |               3 |                       1 | DOING  | NULL    | NULL         |
    +-----------+--------+----------------------------+----------------------------+---------------------------+--------------------+-----------------+-------------------------+--------+---------+--------------+
    1 row in set
    

    References

    • View the job history of load balancing at the log stream level for all tenants: CDB_OB_BALANCE_JOB_HISTORY

    • View the load balancing tasks at the log stream level for all tenants:

      • CDB_OB_BALANCE_TASKS
      • CDB_OB_BALANCE_TASK_HISTORY
    • View the load balancing tasks at the tablet level for all tenants:

      • CDB_OB_TRANSFER_TASKS
      • CDB_OB_TRANSFER_TASK_HISTORY
    • View the transfer partition tasks for all tenants:

      • CDB_OB_TRANSFER_PARTITION_TASKS
      • CDB_OB_TRANSFER_PARTITION_TASK_HISTORY
    • For more information about data load balancing, see Data load balancing.

    Previous topic

    oceanbase.CDB_IND_COLUMNS
    Last

    Next topic

    oceanbase.CDB_IND_PARTITIONS
    Next
    What is on this page
    Purpose
    Columns
    Sample query
    References