Skip to content

Enhanced split and scatter DDL operations #65132

@xhebox

Description

@xhebox

Enhancement

-- Set Region split policies for both existing and future partitions:
ALTER TABLE <table_name>
  SPLIT {PRIMARY KEY [<pk_name>] | INDEX <index_name>}
  BETWEEN (<lower_bound>) AND (<upper_bound>)
  REGIONS <num_regions>;

CREATE TABLE <table_name> (
  <column_definitions>,
  [PRIMARY KEY (<pk_column_list>)],
  [INDEX <index_name> (<index_column_list>), ...]
)
[PARTITION BY RANGE COLUMNS (<partition_column_list>) (
  PARTITION <partition_name_1> VALUES LESS THAN (<value_1>),
  ...,
  PARTITION <partition_name_n> VALUES LESS THAN (MAXVALUE)
)]
[SPLIT PRIMARY KEY [<pk_name>] BETWEEN (<lower_bound>) AND (<upper_bound>) REGIONS <num_regions>]
[SPLIT INDEX <index_name> BETWEEN (<lower_bound>) AND (<upper_bound>) REGIONS <num_regions>, ...];

It is a new feature that can enhance presplit. It is very cubersome to execute and split every partition before. But now it can be persisted and executed anytime there is a relevant DDL.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions