This topic describes table groups in OceanBase Database in Oracle mode.
Definition
By defining a table group, you can control the physical closeness among a group of tables. A table group that contains partitioned tables also consists of several partition groups. Each partition group contains one partition from each table. OceanBase Database automatically moves all the partitions in the same partition group to the same OBserver. OceanBase Database also moves all the leaders of these partitions to the same OBServer.
Limits
Note the following limits on the tables in a table group:
The tables must use the same partitioning method.
HASH-partitioned tables must have the same number of partitions.
RANGE-partitioned tables must have the same number of partitions and the same range definitions.
Note the following rules on the subpartitions of tables in a table group:
- HASH-partitioned tables must have the same number of partitions.
You can add or delete partitions only for a table group that consists of RANGE-partitioned tables.
You cannot use the
ALTER TABLE SET table grouporALTER TABLE GROUP add tablestatement to move a table to a table group that was created in a version earlier than OceanBase Database V2.X.X.Checks are always performed when you add a table to a table group that was created in a version later than OceanBase Database V2.X.X. To be specific, the system checks whether the table to be added and the existing tables in the group have matching partitioning methods, primary zones, and localities.