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

    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.4.2
    iconOceanBase Database
    SQL - V 4.4.2
    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

    Overview

    Last Updated:2026-04-27 03:07:09  Updated
    share
    What is on this page
    Sharding attributes of table groups
    The SCOPE attribute
    Use cases for SCOPE = ZONE
    References

    folded

    share

    A table group is a logical concept that represents a collection of tables. In OceanBase Database, by default, data in different tables is randomly distributed across different storage nodes. By creating a table group, you can explicitly define the physical proximity of a group of tables, thereby optimizing the performance of join queries and simplifying data management.

    Sharding attributes of table groups

    In earlier versions (V3.x), table groups had strict partitioning requirements, which limited the ability to add tables to a group. Starting from V4.2.0, the concept of partitions was replaced by the SHARDING attribute. This attribute determines how partitions of tables in a table group are aggregated and distributed across the cluster. The set of aggregated partitions is called a partition group (Partition Group).

    The SHARDING attribute has the following three modes, corresponding to different data distribution strategies:

    • SHARDING = NONE: Indicates no restrictions on the partitioning method of tables in the table group, and partitions are not aggregated. In versions earlier than V4.4.2 BP1, NONE also implied that all partitions are aggregated on the same server (single-node aggregation). This behavior has been removed in newer versions, and the distribution range is now determined by the SCOPE attribute.

    • SHARDING = PARTITION: The data of each table in the table group is scattered by partition. For a subpartitioned table in the table group, all subpartitions in a partition are aggregated together.

      • Partition requirement: All tables must have the same partition definition. For subpartitioned tables, only the partition definition is verified. Therefore, partitioned tables and subpartitioned tables can coexist in a table group as long as they have the same partition definition.
      • Partition alignment rule: Partitions with the same partition value are aggregated together, including partitions of partitioned tables and all subpartitions in the corresponding partitions of subpartitioned tables.
    • SHARDING = ADAPTIVE: The data of each table in the table group is adaptively scattered. In other words, data in partitioned tables is scattered by partition, and data in subpartitioned tables is scattered by subpartition in each partition.

      Take note of the partition requirement and partition alignment rule for tables in such a table group:

      • Partition requirement: Tables in such a table group are all partitioned tables or all subpartitioned tables. If they are partitioned tables, they must have the same partition definition. If they are subpartitioned tables, they must have the same partition definition and subpartition definition.
      • Partition alignment rule: If all tables in such a table group are partitioned tables, partitions with the same partition value are aggregated together. If all tables in such a table group are subpartitioned tables, subpartitions with the same partition value and subpartition value are aggregated together.

    The SCOPE attribute

    Starting from V4.4.2 BP1, OceanBase Database introduced the SCOPE attribute for table groups. This attribute defines the distribution range of partition groups (Partition Groups) formed after aggregation by the SHARDING attribute.

    The SCOPE attribute has the following three values:

    • SERVER: Indicates that all partition groups are aggregated on the same server. This value provides the strongest data locality but may affect cluster load balancing.
    • ZONE: Indicates that all partition groups are distributed across different servers within the same zone. This value balances data locality and load balancing within the zone.
    • CLUSTER: Indicates that all partition groups are distributed across different servers in the cluster. This value maximizes cluster load balancing but may increase cross-node access.

    Use cases for SCOPE = ZONE

    1. Cross-zone latency-sensitive applications: Aggregate the leaders of related partitions in the same zone to reduce cross-zone access latency.
    2. Load balancing within a zone: Distribute the leaders of different partitions across different servers within the same zone to avoid overloading a single server.
    3. Global index consistency: Ensure that the leaders of the main table and global indexes are in the same zone to maintain data locality.

    References

    • Create a table group

    • Query table group information

    • Add tables to a table group

    • Modify the SHARDING attribute of a table group

    • Manage tables in a table group

    • Drop a table group

    Previous topic

    Partition exchange
    Last

    Next topic

    Create a table group
    Next
    What is on this page
    Sharding attributes of table groups
    The SCOPE attribute
    Use cases for SCOPE = ZONE
    References