Composite partitions

Updated at:
Copy as MD

This topic describes the supported transformations for composite partitions in CREATE TABLE Data Definition Language (DDL) when you migrate data from an Oracle database to an Oracle tenant in an OceanBase database.

Range composite partitions

The syntax for a range composite partition, composite_range_partitions, is as follows:

PARTITION BY RANGE ( column [, column]... )
  [ INTERVAL ( expr ) [ STORE IN ( tablespace [, tablespace]... ) ]]
  { subpartition_by_range
  | subpartition_by_list
  | subpartition_by_hash
  }
( range_partition_desc [, range_partition_desc ]... )
  • The primary partition can be a range partition. For more information, see range partitions. Subpartitions can be range, list, or hash partitions. The subpartition_by_range, subpartition_by_list, and subpartition_by_hash clauses are supported. For more information, see subpartitions.

  • You can use the range_partition_desc clause to customize range partitions. For more information, see custom partitions.

  • The INTERVAL and STORE IN clauses are not supported for defining partition intervals or allocating partition space. These options are ignored.

List composite partitions

The syntax for a list composite partition, composite_list_partitions, is as follows:

PARTITION BY LIST ( column [, column]... )
[ AUTOMATIC [ STORE IN ( tablespace [, tablespace ]... ) ] ]
  { subpartition_by_range
  | subpartition_by_list
  | subpartition_by_hash
  }
( list_partition_desc [, list_partition_desc]... )
  • The primary partition can be a list partition. For more information, see list partitions. Subpartitions can be range, list, or hash partitions. The subpartition_by_range, subpartition_by_list, and subpartition_by_hash clauses are supported. For more information, see subpartitions.

  • You can use the list_partition_desc clause to customize list partitions. For more information, see custom partitions.

  • The AUTOMATIC and STORE IN clauses are not supported for the automatic creation of list partitions or allocation of space. These options are ignored.

Hash composite partitions

The syntax for a hash composite partition, composite_hash_partitions, is as follows:

PARTITION BY HASH (column [, column ] ...)
  { subpartition_by_range
  | subpartition_by_list
  | subpartition_by_hash
  }
  { individual_hash_partitions
  | hash_partitions_by_quantity
  }

The primary partition can be a hash partition. For more information, see hash partitions. Subpartitions can be range, list, or hash partitions. The subpartition_by_range, subpartition_by_list, and subpartition_by_hash clauses are supported. For more information, see subpartitions.